GithubHelp home page GithubHelp logo

facebook-page-scraper's Introduction

Usage

Case 1:Scrape All Default Pages

Run

python scrape_fb_pages.py --page_id all --access_token "your_access_token"

Case 2:Scrape One Specific Page

Run

python scrape_fb_pages.py --page_id 123123 --access_token "your_access_token"

How To Get "access_token"

1. Goto https://developers.facebook.com/tools-and-support/
2. Click "Graph API Explorer"
3. A tempory_token Is Created For You, Copy It

How To Get "page_id"

1. Goto the Facebook Page You Want to Scrape
2. Right Click and Select "View Page Source"
3. In the HTML Souce Code, Find page_id="123123xxx"

Parameters

Parameter Description
--page_id "all" means scraping all default pages, OR a specific facebook page_id like "12321xxxxx"
--access_token temporary access_token for facebook developer
--since_date date start scraping, "date 7 days ago by default", format YYYY-MM-DD
--until_date date end scraping, "date today by default", format YYYY-MM-DD

Help Guide

Run

python scrape_fb_pages.py -h

Default Pages

1. open file "scrape_fb_pages.py"
2. all deafult page_id are stored in the list variable called "page_ids"
3. all mappings of page_id and page_name are stored in the dict variable called "page_id_name"

Plot

Run

python pandas_plot.py

Contribution

You are more then welcome! Please open a PR or issues here.

facebook-page-scraper's People

Contributors

zhaohangbo 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.