kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.27k stars 611 forks source link

empty csv file #155

Closed Rahulsunny11 closed 3 years ago

Rahulsunny11 commented 3 years ago

Hi, I am trying to scrape pages using your facebook_scraper and tried to download it as a csv file but I am getting empty csv with only column names.. I am attaching the code I used.. please help me with this. Thanks

for post in get_posts('pKamiKat', pages=3): print(post) data = pd.DataFrame(post) data.to_csv("scraped_listings.csv")

Rahulsunny11 commented 3 years ago

Hi, solved the issue.. attached updated code `for posts in get_posts('thota.sitaramalakshmi', pages=3):

print(post)

lists.append(posts)

df = pd.DataFrame(lists)

df.to_csv(r'fb_page_scrape.csv')`

thanks