Open june2kicks opened 6 years ago
there is a little detail:
python3 config.py
not python config.py
:D
How I feel so stupid :(
Now I have got an other issue.
Everything run correctly but when I want to connect to instagram is ok for 2s and after everything disappear and I have the following message on terminal. I receive an email from instagram too that tell that there is a suspicious activity on my account.
Last login: Fri Sep 14 19:14:08 on ttys000
MacBook-Pro-de-June2kicks:~ june2kicks$ cd documents
MacBook-Pro-de-June2kicks:documents june2kicks$ cd webdriver
MacBook-Pro-de-June2kicks:webdriver june2kicks$ cd instapy-light-master
MacBook-Pro-de-June2kicks:instapy-light-master june2kicks$ python3 config.py
18-09-14 19:29:28 INFO - Session started
Cookie file not found, creating cookie...
18-09-14 19:30:00 INFO - Session ended - 2018-09-14 19:30:00
18-09-14 19:30:00 INFO - --------------------
Traceback (most recent call last):
File "config.py", line 33, in <module>
session.login()
File "/Users/june2kicks/Documents/WebDriver/InstaPy-Light-master/app/instapy.py", line 207, in login
self.bypass_suspicious_attempt):
File "/Users/june2kicks/Documents/WebDriver/InstaPy-Light-master/app/login.py", line 135, in login_user
"//article/div/div/p/a[text()='Log in']")
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 393, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 966, in find_element
'value': value})['value']
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //article/div/div/p/a[text()='Log in']
MacBook-Pro-de-June2kicks:instapy-light-master june2kicks$
I am really sorry I never code before.
Any ideas?
Cheers
don't worry, fail is part of success! you can add this option to bypass suspicious login attempt:
bypass_suspicious_attempt
example:
session = InstaPyLight(username='',
password='',
bypass_suspicious_attempt=True,
headless=False)
after first successful login, you can delete the bypass_suspicious_attempt line
thanks a lot you are really helpfull.
So I did what you said but now I have got this message.
Last login: Fri Sep 14 19:28:31 on ttys000
MacBook-Pro-de-June2kicks:~ june2kicks$ cd documents
MacBook-Pro-de-June2kicks:documents june2kicks$ cd webdriver
MacBook-Pro-de-June2kicks:webdriver june2kicks$ cd instapy-light-master
MacBook-Pro-de-June2kicks:instapy-light-master june2kicks$ python3 config.py
18-09-14 19:53:57 INFO - Session started
Cookie file not found, creating cookie...
18-09-14 19:54:27 INFO - Session ended - 2018-09-14 19:54:27
18-09-14 19:54:27 INFO - --------------------
Traceback (most recent call last):
File "config.py", line 34, in <module>
session.login()
File "/Users/june2kicks/Documents/WebDriver/InstaPy-Light-master/app/instapy.py", line 207, in login
self.bypass_suspicious_attempt):
File "/Users/june2kicks/Documents/WebDriver/InstaPy-Light-master/app/login.py", line 135, in login_user
"//article/div/div/p/a[text()='Log in']")
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 393, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 966, in find_element
'value': value})['value']
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //article/div/div/p/a[text()='Log in']
MacBook-Pro-de-June2kicks:instapy-light-master june2kicks$
I think there is an issue with the creating cookie part.
Cheers
the cookie behavior is ok, when there is no cookie yet (first time you run the script), it will show that message.
I tried the bypass suspicious feature, and it´s working fine. What last_screen.png shows you ?
Sorry, I didn't receive any notification for your answer.
So now I can connect but it disconnect right away after connexion (see below).
Last login: Sun Sep 16 14:52:51 on ttys000
MacBook-Pro-de-June2kicks:~ june2kicks$ cd documents
MacBook-Pro-de-June2kicks:documents june2kicks$ cd webdriver
MacBook-Pro-de-June2kicks:webdriver june2kicks$ cd instapy-light-master
MacBook-Pro-de-June2kicks:instapy-light-master june2kicks$ python3 config.py
18-09-16 14:56:35 INFO - Session started
18-09-16 14:56:38 INFO - Logged in successfully!
18-09-16 14:56:39 INFO - Session ended - 2018-09-16 14:56:39
18-09-16 14:56:39 INFO - --------------------
MacBook-Pro-de-June2kicks:instapy-light-master june2kicks$
Here the last_screen.png I have got:
Cheers
everything is good, it connects and login successfully, now you need to add the features you want to use in the config.py file
yes, I figured out just after I put my message, I am gonna follow all your tutorial now to customize my own bot.
Thanks a lot.
Cheers
Hi,
I tried to run InstaPy-Light. I made everything like in the tutorial video: https://www.youtube.com/watch?v=h9svDhveps8 but I have got an issue when I try to run it.
I put my info on the config.py and lunch python config.py but nothing happened.
My code:
Did I miss something?
Cheers