Code Monkey home page Code Monkey logo

facebook-scraper's Introduction

Facebook Scraper

This tool lets you download a GDF network

Installation

You'll need to have python, pip, and Crhome Driver

Once that's all set up:

  1. Clone this repository
  2. cd into the cloned folder
  3. Create a python enviornment
  4. pip install -r requirements.txt
  5. Download chromedriver https://sites.google.com/a/chromium.org/chromedriver/
  6. Copy the cromedriver into the bin folder of your environment

I ran it using python 3.5.2

Get GDF of connections & IDs

Getting your list of friends is no longer possible via the Facebook Graph API, so you can use this. It has 2 modes:

  1. Download a list of your connections, and
  2. Download a list of your 2nd-degree connections for social network analysis. You can choose between downloading mutual friends or al 2n-degree friends
  3. Save data to a GDF file

Get your 2n-degree network connections (your friends' friends)

Note: This could take days if you have lots of friends!

1a. Run python facebook-connections.py 0, to get all of your friends' friends . 1b. Run python facebook-connections.py 0, to get only your friends' mutual friends . 2. A browser window will open. Fill out your username & password and log in. 3. Press Enter in the terminal after logging in. 4. You should the script looping through your Facebook friends' friend pages. 5. A GDF file will be created with the data (your_name_connections.gdf)

Note: This currently may get tripped up by in some situations, because the scroll_to_bottom() function doesn't accurately detect when it's at the bottom of the friends list. Please feel free to improve with a pull request!

facebook-scraper's People

Contributors

jcontini avatar joancf avatar santteegt avatar

Watchers

James Cloos 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.