Skip to content

Instantly share code, notes, and snippets.

@jrosen48
Created May 16, 2022 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrosen48/9df09016daacc1cfb286ac257d479235 to your computer and use it in GitHub Desktop.
Save jrosen48/9df09016daacc1cfb286ac257d479235 to your computer and use it in GitHub Desktop.
scrape-comments-from-fb-pst
from facebook_scraper import *
import pandas as pd
set_user_agent("Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)")
page = pd.DataFrame()
for post in get_posts('245937932251091/posts/2129192957258903', pages=10 ,options={"comments": True}, credentials = ("jrosenb8@utk.edu","025021")):
page = page.append(post, ignore_index = True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment