Skip to main content

Python and selenium based (mobile) Facebook groups scraper, independent of obfuscated css selectors.

Project description

Facebook group scraper

A simple selenium-dependent python scraper for Facebook groups.

Requirements:

  • Python 3.6 or newer
  • Selenium (automatically installed)

Installing

# pypi
pip3 install fbgs

# local
git clone https://github.com/lesander/facebook-group-scraper.git
cd facebook-group-scraper/
pip3 install -r requirements.txt

Usage

Cli usage:

# local & pypi
python3 -m fbgs \
--username user@example.com \
--password "example-password" \
--url https://m.facebook.com/groups/group-name \
--output ./path/for/output.json \
--no-shell  # toggle to disable default selenium interactive prompt

Programmatic usage:

from fbgs import FacebookScraper
from fbgs.exceptions import ScraperException
try:
    scraper = FacebookScraper(
        username="user@example.com", password="example-password")
    scraper.login()
    g = scraper.scrape_group(url="https://m.facebook.com/groups/group-name", out="output-example.json")
    scraper.interactive()
except ScraperException as e:
    print(f'ScraperException: {e}')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fbgs-1.0.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fbgs-1.0.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file fbgs-1.0.0.tar.gz.

File metadata

  • Download URL: fbgs-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for fbgs-1.0.0.tar.gz
Algorithm Hash digest
SHA256 13c4ca9b870e6987402c12461ed8e501f49a42714092609d87cdf970f746ca14
MD5 16e74e86453aa6d9cb6269ed1f835c21
BLAKE2b-256 ab17e61efb1cc55107c50ddd3252d11eaa12130c30399cc8922569c26b88e451

See more details on using hashes here.

File details

Details for the file fbgs-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: fbgs-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for fbgs-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00c4ae6a4a43cd2e32c1270eca4cf96d50b5887fb5d2b6e7fe4f520fc1faa1ce
MD5 61b3006071ae1bf30da511d9037d8b34
BLAKE2b-256 7268699e17784dd0cfb41df97b443a0bc55a5751c9f6dd789b4cb86ad75226f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page