Skip to content

A simple python3 script used to download a users's friend list from facebook.

License

Notifications You must be signed in to change notification settings

AnanyaQE/selenium_facebook_scraper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple python3 script used to download a users's friend list from facebook.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%