Skip to main content

Tool to scrape names and usernames from large friend lists on Facebook, without being rate limited.

Project description

Facebook Friend List Scraper

OSINT tool to scrape names and usernames from large friend lists on Facebook, without being rate limited.

Getting started:

  • Install using pip: python -m pip install fb-friend-list-scraper
  • Script is now installed as fbfriendlistscraper
  • Run with -h or --help to show usage information.

Usage:

usage: fbfriendlistscraper [-h] -e EMAIL [-p PASSWORD] -u USERNAME [-o OUTFILE] [-w] [-q] [-x] [-s SLEEPMULTIPLIER] [-i PROXY] [-c CMD]

Tool to scrape names and usernames from large friend lists on Facebook, without being rate limited

options:
  -h, --help            show this help message and exit
  -e EMAIL, --email EMAIL
                        Email address or phone number to login with.
  -p PASSWORD, --password PASSWORD
                        Password to login with. If not supplied you will be prompted. You really shouldn't use this for security reasons.
  -u USERNAME, --username USERNAME
                        Username of the user to scrape.
  -o OUTFILE, --outfile OUTFILE
                        Path of the output file. (Default: ./scraped_friends.txt)
  -w, --headless        Run webdriver in headless mode.
  -q, --quiet           Do not print scraped users to screen.
  -x, --onlyusernames   Only the usernames/IDs will be written to the output file.
  -s SLEEPMULTIPLIER, --sleepmultiplier SLEEPMULTIPLIER
                        Multiply sleep time between each page scrape by n. Useful when being easily rate-limited.
  -i PROXY, --proxy PROXY
                        Proxy server to use for connecting. Username/password can be supplied like: socks5://user:pass@host:port
  -c CMD, --cmd CMD     Shell command to run after each page scrape. Useful for changing proxy/VPN exit.

examples:
        fbfriendlistscraper -e your@email.com -p YourPassword123 -u someusername.123 -o my_file.txt
        fbfriendlistscraper --email your@email.com --username another.user --headless -s 2 -x
        fbfriendlistscraper -e your@email.com -u username.johnson -w --proxy socks5://127.0.0.1:9050
        fbfriendlistscraper -e your@email.com -u xxuserxx --headless --cmd "mullvad relay set provider Quadranet"
        fbfriendlistscraper -e your@email.com -u markzuckerburger -w -o ./test.txt --cmd "killall -HUP tor"

NOTE:

Facebook changes the markup of it's pages regularly, so the script might break from time to time. Please open an issue if something doesn't work and I'll take a look at it. Pull requests are welcome as well.

TODO:

  • Make script check for followers if friend list isn't public.
  • Add more error handling.
  • Add proxy rotation.

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

fb_friend_list_scraper-0.3.5.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

fb_friend_list_scraper-0.3.5-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file fb_friend_list_scraper-0.3.5.tar.gz.

File metadata

File hashes

Hashes for fb_friend_list_scraper-0.3.5.tar.gz
Algorithm Hash digest
SHA256 8ebb500afe6d9688fe4a112b621468d255677c897ecf199a7cf1cb8dc3deffb7
MD5 2bf8637dc71a1b4d7c83f9e369972f7e
BLAKE2b-256 ffeb27f2922954ee1ff04e3163e1c7fce321839a36ec5754caa7df9b46fde29e

See more details on using hashes here.

File details

Details for the file fb_friend_list_scraper-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for fb_friend_list_scraper-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c675b0d9f2342ed8d93f67483b900781e4d315f46eb45bc03b0db10df3051cc7
MD5 9c1f6ddc124390ed34a559f6774d8ac7
BLAKE2b-256 eb226a4b60c1a463f0961575a18e4ffc3a0e44c7a40998c24f95057ea1925074

See more details on using hashes here.

Supported by

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