moda20 / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
60 stars 23 forks source link

Dont get commenter_id in comments #53

Open Chinok08 opened 2 months ago

Chinok08 commented 2 months ago

I'm trying to get the commenter_id of each comment but it returns null

from facebook_scraper import get_posts import json

cookies = None with open('./mbasicHeaders.json', 'r') as file: cookies = json.load(file)

for post in get_posts('mazdamexico', pages=1, base_url="https://mbasic.facebook.com", start_url="https://mbasic.facebook.com/mazdamexico?v=timeline", options={"comments": True, "progress": True}, cookies=cookies): json_data = json.dumps(post, default=str, indent=4) print(json_data)

{ "comment_id": "723592659845668", "comment_url": "https://facebook.com/723592659845668", "commenter_id": null, "commenter_url": "https://facebook.com/Beiazaay?eav=AfYW0KeHiHTOlfDUOQ0I6r6wt7ShCZSDfOGYnMbgpuZLdC4tH_DomsyG40mN9hY7uvU&rc=p&refid=52&__tn__=R&paipv=0", "commenter_name": "Beia Zaay", "commenter_meta": null, "comment_text": "Que chulada \ud83d\ude0d", "comment_time": null, "comment_image": null, "comment_reactors": [], "comment_reactions": null, "comment_reaction_count": "1", "replies": [] },

Do I have something wrong?