Closed aymen-ch closed 9 months ago
@moda20 Please do you have a solution?
@aymen-ch Pleaseput an example file that we can use as reference
@moda20 This code does not work
POST_ID = "pfbid02NsuAiBU9o1ouwBrw1vYAQ7khcVXvz8F8zMvkVat9UJ6uiwdgojgddQRLpXcVBqYbl"
MAX_COMMENTS = 100
gen = fs.get_posts( post_urls=[POST_ID], options={"comments": MAX_COMMENTS, "progress": True} )
post = next(gen)
comments = post['comments_full']
@aymen-ch please check the readme for the working example, it's not the same anymore example anymore
@moda20 You can give me the working example because I didn't find it in the readme file
@aymen-ch i updated the readme with the right info now, but here is an exampe using the nintendo page
postUrls = ['https://mbasic.facebook.com/nintendo/posts/739497288205876']
post = next( get_posts(post_urls=postUrls, cookies='cookies.txt', options={"allow_extra_requests": True, "comments": 100}))
print(post)
for now declaring the array separately is necessary because of some typing issues, will be resovled in the future
@moda20 I tried the code but unfortunately it doesn't work it returns the post data but not the comments
@aymen-ch I ahve added some updates to get the comments and their replies but i will need someone to try it and help with debugging. please try it yourself if you can
@moda20 I executed the code but it does not return the comments and there is no error message
@aymen-ch please include ann example input and output with your replies, i don't know what do you mean by it didn't work, i have added comments for the page scrapping, are you scrapping groups by chance ?
gen = get_posts( post_urls=[POST_ID], options={"comments": MAX_COMMENTS, "progress": True}, cookies=cookiefile ) maybe you need cookies
I am closing this since it seems to be stale, please open a new issue if you still can't get any comments
I can't retrieve comments with the code mentioned in the readme file