Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/berecat/selenium_facebook_scraper
A simple python3 script used to download a users's friend list from facebook.
https://github.com/berecat/selenium_facebook_scraper
automation crawler facebook facebook-scraper webscraper
Last synced: 6 days ago
JSON representation
A simple python3 script used to download a users's friend list from facebook.
- Host: GitHub
- URL: https://github.com/berecat/selenium_facebook_scraper
- Owner: berecat
- License: gpl-3.0
- Created: 2022-10-28T11:22:18.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-07T20:46:01.000Z (about 1 year ago)
- Last Synced: 2024-09-12T03:18:55.146Z (2 months ago)
- Topics: automation, crawler, facebook, facebook-scraper, webscraper
- Language: Python
- Homepage:
- Size: 12.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](example.gif)
## 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
- Python (3+). [[How to install](https://realpython.com/installing-python/)]
- BeautifulSoup4 for python3. [[How to install](https://www.crummy.com/software/BeautifulSoup/bs4/doc/)]
```
pip3 install bs4
```
- Selenium for python3. [[How to install](https://selenium-python.readthedocs.io/installation.html)]
```
pip3 install selenium
```
- Firefox webbrowser. [[Windows](https://support.mozilla.org/en-US/kb/how-download-and-install-firefox-windows), [Linux](https://support.mozilla.org/en-US/kb/install-firefox-linux), [Mac](https://support.mozilla.org/en-US/kb/how-download-and-install-firefox-mac)]
- Geckodriver for Firefox. [[How to install](https://github.com/mozilla/geckodriver/releases/)]## License
This project is licensed under the GNU GPLv3 License - check [LICENSE](LICENSE) for more details.