-
Notifications
You must be signed in to change notification settings - Fork 613
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
Login unsuccessful #28
Comments
for post in get_posts(group='EatsleeprepeatESR/', credentials=('yushaa.malik6969@gmail.com', '*****************')):
print(post['text'][:50]) Also check if you have 2 factor auth enabled (I guess that would also produce login unsuccessful) |
Empty console. Nothing happens. No error, nothing. Also, I do not have 2 factor auth enabled. |
A way to check if the login is successful is to request some path that requires authentication, e.g.: next(facebook_scraper.get_posts(account='something', credentials=('email@user.com', '***'))
response = facebook_scraper._session.get('https://m.facebook.com/settings', allow_redirects=False)
print(response.status_code) If it prints 200 it means the login worked, 300 means it didn't. You might want to check the response from the post request in the login function to see what went wrong: facebook-scraper/facebook_scraper.py Lines 271 to 274 in 0636e16
Also, I've noticed group scraping doesn't work sometimes 😕, so maybe the issue is not login related. |
The login works, yet there is not data scraped. |
Same problem, no data scraped. |
Same problem too, no data scraped. @kevinzg |
I also had this issue. I tried logging in before and after disabling multi-factor authentication using a generated App Password. Something I noticed while creating my PR above is that the latest (not yet released) version of the login function will probably include more debugging info for login difficulties. facebook-scraper/facebook_scraper/facebook_scraper.py Lines 71 to 78 in 1a703c8
So hopefully we will be able to view the debug info for the login attempts using an argument/option in the next release |
I have installed the latest version (10 Nov 2020) of facebook_scraper. I execute the code:
and i get the following: C:\Users\tampn\Anaconda3\lib\site-packages\facebook_scraper\facebook_scraper.py:80: UserWarning: login unsuccessful To be noticed that, I have disabled multi-factor authentication! Can you help me, please? |
Same here |
same here |
I can confirm the issue is with Groups. I can scrape pages, I change to a group and get a login unsuccessful message |
same here |
Same here bro, Is someone has any solution? |
same. |
I added a cookies parameter on the latest version, try with that please. To use it log into Facebook on your browser, then install an extension to export the cookie file, like this one. Please report back as I haven't tried it. |
I got "Login Approval Needed" on CLI. Please tell me what I should do? |
You need to login with a browser and approve the login |
Thank for replying I've done 2FA but still didn't work |
I logged in with a browser then ran the code, in the first loop, unauthorized devices notification popped up and I approved it then the next loop same issue occur as if it's not the same device/ user agent. |
Maybe just use cookies then |
get_posts(target_id, pages=5, extra_info=True, credentials=(_email, _password), cookies='cookies.json') I got '_email' is not defined. |
no, use one or the other. Just delete the credentials argument if you don't need it |
Hello, I'm having trouble using the lib. I tried this : I put both user_c and xs cookies in cookies.txt but it doesn't work. To finish : I tried this Could you help me ? I work under kali linux and I am in Europe |
try update to latest master, a recent PR (#606) fixed an issue with logins originating from Europe |
Thank it work for profiles. |
for post in get_posts(group='EatsleeprepeatESR/', credentials={'email' : 'yushaa.malik6969@gmail.com' , 'pass' : '*****************'}):
print(post['text'][:50])
This is my code. Despite of providing my correct credentials, it gives me error:
" warnings.warn('login unsuccessful')
UserWarning: login unsuccessful"
The text was updated successfully, but these errors were encountered: