Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'comments_full' #1101

Open
clamalou96 opened this issue May 1, 2024 · 1 comment
Open

KeyError: 'comments_full' #1101

clamalou96 opened this issue May 1, 2024 · 1 comment

Comments

@clamalou96
Copy link

I'm a very amateurish Python user who is scraping FB comments for my PhD. Very grateful for your code which I have been using pretty much with zero issues for the past year or so. But suddenly I've been getting KeyError: 'comments_full' response. I saw another thread on this from Oct 2022, which said it hadn't been fixed but I'd used it then and it worked fine. I've tried following other advice and making sure to use URLs with pfbid etc. Is there anything else to try that you'd recommend? For reference, this is the code I've been using, pretty much exactly what was originally posted:

import facebook_scraper as fs
POST_ID = "[full URL, just ID didn't work for me]"
MAX_COMMENTS = True
gen = fs.get_posts(
post_urls = [POST_ID],
options = {"comments": MAX_COMMENTS, "progress": True}
)
post = next(gen)
comments = post['comments_full'] --> triggers KeyError

@qianxuwanyu
Copy link

您好,这个问题解决了吗,这对我很重要,可以回复我吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants