Code Monkey home page Code Monkey logo

selenium_facebook_scraper's Introduction

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.

selenium_facebook_scraper's People

Contributors

mhmd-hisham avatar adhamghoname avatar ananyaqe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.