Comments (8)
there is a little detail:
python3 config.py
not python config.py
:D
from instapy-light.
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
from instapy-light.
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
from instapy-light.
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
from instapy-light.
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
from instapy-light.
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 ?
from instapy-light.
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
from instapy-light.
everything is good, it connects and login successfully, now you need to add the features you want to use in the config.py file
from instapy-light.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instapy-light.