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

Login Fail #1091

Open
2849232wy opened this issue Feb 22, 2024 · 0 comments
Open

Login Fail #1091

2849232wy opened this issue Feb 22, 2024 · 0 comments

Comments

@2849232wy
Copy link

2849232wy commented Feb 22, 2024

import facebook_scraper
from facebook_scraper import get_posts

facebook_scraper.set_user_agent("Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36")
for post in get_posts('nintendo', pages=1, credentials=("xxx","xxx")):
print(post['text'][:50])

Traceback (most recent call last):
File "F:\facebook\TestPosts.py", line 7, in
for post in get_posts('nintendo', pages=1, credentials=("xxx","xxxx")):
File "C:\Program Files\python3.9\lib\site-packages\facebook_scraper_init_.py", line 221, in get_posts
_scraper.login(*credentials)
File "C:\Program Files\python3.9\lib\site-packages\facebook_scraper\facebook_scraper.py", line 966, in login
response = self.submit_form(
File "C:\Program Files\python3.9\lib\site-packages\facebook_scraper\facebook_scraper.py", line 951, in submit_form
action = response.html.find("form", first=True).attrs.get('action')
AttributeError: 'NoneType' object has no attribute 'attrs'

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

1 participant