facebook-scraper
facebook-scraper copied to clipboard
Can only get at most 20 relevant comments
Here is my code:
gen = fs.get_posts(
post_urls = ["https://mbasic.facebook.com/" + fanpage + "/posts/" + '939460300875189'],
options = {"comments": 30, "progress": True}
)
post = next(gen)
comments = post['comments_full']
i = 0
for comment in comments:
print(i)
print(comment['comment_text'])
print()
i += 1
It returns at most 20 comments and they are all "relevant" ones but not "all comments". The kevinzg version succeeds in getting all comments, but I think it requires using URLs starting with "pfbid" which I don't know how to get.