kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.38k stars 627 forks source link

A login (cookies) is required to see this page #537

Open BtencateSphereon opened 2 years ago

BtencateSphereon commented 2 years ago

Was there a change at facebook or something? I was able to scrape using tor a few days ago. But today this error showed up "Your request couldn't be processed". Now I did see a commit fixing that. But now it returns "A login (cookies) is required to see this page". Which was not the case a few days ago.

Anything we can do about this?

Side note, that was one quick fix for the "Your request couldn't be processed" . thanks for that

neon-ninja commented 2 years ago

If facebook says you need to login, you need to login

DalyaR commented 2 years ago

Hi. I faced the same problem, and I solved it by using "EditThisCookie" https://www.editthiscookie.com/ extension in chrome. The following page will explain to you what to do exactly https://dataflowkit.com/blog/how-to-pass-cookies-to-a-scraper-from-a-web-browser/ I hope it will solve your problem.

birdog411 commented 2 years ago

Hi. I faced the same problem, and I solved it by using "EditThisCookie" https://www.editthiscookie.com/ extension in chrome. The following page will explain to you what to do exactly https://dataflowkit.com/blog/how-to-pass-cookies-to-a-scraper-from-a-web-browser/ I hope it will solve your problem.

Hello, can you post an example of you code please, I have tried mutliple variatons with the cookie but keep getting the same error. CHeers

neon-ninja commented 2 years ago

See the cookies section of the README - https://github.com/kevinzg/facebook-scraper/blob/master/README.md

hplisiecki commented 1 year ago

@neon-ninja At the current moment there seems to be no option to pass cookies to the get_posts_by_url function. Will it be updated? Is there a workaround? I would love if there was a function that simply logs you into facebook, before scraping anything.