Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 2.08 KB

README.md

File metadata and controls

47 lines (36 loc) · 2.08 KB

Python3 Facebook Scraper

This is a simple python3 script used to download a user's friend list from facebook. The script uses selenium & Firefox to automate the login process and extract the data from the user's account. All you have to do is to write the email and password and the script will do all the work. Simple!

Example

Usage

user:~$ python3 facebook_scraper.py --help
usage: facebook_scraper.py [-h] [-v] [-b] [-t TIMEOUT] [-j] [-c] [-s] [-i HTMLPAGE] [-l LOGINFILE]

Use Selenium & Firefox to automate Facebook login and scrape user's friend list.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Increase verbosity level.
  -b, --headless        Activate headless mode, run firefox in the background.
  -t TIMEOUT, --timeout TIMEOUT
                        Time to wait for elements to load on webpages before giving up. (30s)
  -j, --json            Export user's friend list in JSON format. (default)
  -c, --csv             Export user's friend list in CSV format.
  -s, --html            Export the source html page.
  -i HTMLPAGE, --import-html HTMLPAGE
                        Import data from source html page.
  -l LOGINFILE, --login-data LOGINFILE
                        Read login data from file.

Requirements

pip3 install bs4
pip3 install selenium

License

This project is licensed under the GNU GPLv3 License - check LICENSE for more details.