Your request couldn't be processed
See original GitHub issueHi, I tried to log in with my account but I get the error:
File “…/main.py”, line 4, in <module> set_cookies(“facebook.com_cookies.txt”) File “…\Python38\site-packages\facebook_scraper_init_.py”, line 35, in set_cookies if not _scraper.is_logged_in(): File “…\facebook_scraper\facebook_scraper.py”, line 524, in is_logged_in self.get(‘https://m.facebook.com/settings’) File “…\facebook_scraper\facebook_scraper.py”, line 454, in get raise exceptions.UnexpectedResponse(“Your request couldn’t be processed”) facebook_scraper.exceptions.UnexpectedResponse: Your request couldn’t be processed
I tried another account and the login was successful but when I try to use this code:
set_cookies("facebook.com_cookies.txt") posts = get_posts('nintento', pages=10) print(len(posts))
It return 0
What can I do? Thanks
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:14 (1 by maintainers)
Top GitHub Comments
It can’t really find a pattern in these errors. From my quick tests it seems that backing off for a few seconds and then retrying fixes the issue in most cases.
I made a quick-and-dirty recursive hack to add retrying to the FacebookScraper.get method, which seems to work. I haven’t made a pull request yet, since im not 100p certain about the viability of the method.
But here are the changes i made:
get
todef get(self, url, retry_count=0, **kwargs):
My impression is that Facebook is becoming stricter. Maybe they are specifically checking for facebook-scraper? I wonder what others’ experiences are …