moda20 / facebook-scraper

Scrape Facebook public pages without an API key

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dont get commenter_id in comments

Chinok08 opened this issue · comments

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?