kevinzg / facebook-scraper

Scrape Facebook public pages without an API key
MIT License
2.29k stars 616 forks source link

can not login #164

Closed veronicaads closed 3 years ago

veronicaads commented 3 years ago

Hello i try to use this facebook scraper to login and try to scrape some post in private group, but seems i can not login using your code, any suggestion ?

from facebook.facebook_scraper import FacebookScraper, page_iterators

scraper = FacebookScraper()
parser = page_iterators.GroupPageParser
scraper.login(email, password)

this is the code i try and i try print the response


<Response [200]>
/login/device-based/regular/login/?refsrc=https%3A%2F%2Fm.facebook.com%2F&lwv=100&refid=8
<Response [200]

<HTML url='https://m.facebook.com/login/device-based/regular/login/?refsrc=https%3A%2F%2Fm.facebook.com%2F&lwv=100&refid=8'>
Facebook
facebook
Your request couldn't be processed
There was a problem with this request. We're working on getting it fixed as soon as we can.
Join Facebook or log in to continue.
Join
or
Log In
Loading...
Try Again

seems i got wrong at 'c_cookies' line at line 80 from facebook_scrapper.py

Medevin commented 3 years ago

I have the same issue with the same response. But the problem seems to be higher. response = self.session.post( utils.urljoin(self.base_url, login_action), data={'email': email, 'pass': password} ) If we remove 'data' response will be the same.

csprh commented 3 years ago

I get the same problem as veronicaads.

kevinzg commented 3 years ago

Duplicate of #28. Try the method I described there: https://github.com/kevinzg/facebook-scraper/issues/28#issuecomment-793066983