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

AttributeError: 'NoneType' object has no attribute 'send_keys' #113

Open
katrikken opened this issue Mar 12, 2021 · 3 comments
Open

AttributeError: 'NoneType' object has no attribute 'send_keys' #113

katrikken opened this issue Mar 12, 2021 · 3 comments

Comments

@katrikken
Copy link

Hi, I am trying to run a simple request on one of my own accounts (username and password of another account) like this:

python crawler.py posts_full -u katrikken -n 1

And I get an error:

Traceback (most recent call last):
File "crawler.py", line 83, in
args.username, args.number, args.mode == "posts_full", args.debug
File "crawler.py", line 27, in get_posts_by_user
ins_crawler = InsCrawler(has_screen=debug)
File "C:\Users\kurys\IdeaProjects\myprojects\instagram-crawler-master\inscrawler\crawler.py", line 70, in init
self.login()
File "C:\Users\kurys\IdeaProjects\myprojects\instagram-crawler-master\inscrawler\crawler.py", line 82, in login
u_input.send_keys(secret.username)
AttributeError: 'NoneType' object has no attribute 'send_keys'

Could you please help me out why is it falling?

I renamed secret.py.dist to secret.py and the contents look like this:

----------start of contents-----------
import os

username = os.environ.get('USERNAME', 'katrikken_dancing')
password = os.environ.get('PASSWORD', '******')
-----------end of contents-----------
Thank you!

@Cocytusi
Copy link

I have the same problem with you

@ege-del
Copy link

ege-del commented Mar 23, 2021

Looks like Instagram detects the headless selenium driver and redirects to a page with message "Please wait a few minutes before you try again". If you add the parameter --debug it works as expected because driver is not running on headless mode when --debug parameter is active

@SuhyunL
Copy link

SuhyunL commented Mar 25, 2021

@ege-del Your code worked for me. Thank you for sharing!

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

4 participants