kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.29k stars 616 forks source link

Profile Scraper #183

Closed tahakorkmazTGA closed 3 years ago

tahakorkmazTGA commented 3 years ago

I have made a profile scraper with same tools, but it's only been for the front page posts of the profile. After implementing the scrape for other pages and media links can we add this to the project.

Thanks

neon-ninja commented 3 years ago

This tool works for posts made by user profiles already

tahakorkmazTGA commented 3 years ago

wait really? i couldn't manage to make it work and developed it myself though mine wasn't this complex

neon-ninja commented 3 years ago

Yes, you just need to pass cookies generally. For example, the code:

posts = list(get_posts("joe.trinder", pages=10, cookies="cookies.txt"))
print(len(posts))

returns

100
tahakorkmazTGA commented 3 years ago

by cookies.txt do you mean the chrome's cookies after i login to the facebook?

neon-ninja commented 3 years ago

Yes, in Netscape format. See https://github.com/kevinzg/facebook-scraper/issues/28#issuecomment-793066983