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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running instapy first time #4895

Closed
twilsens opened this issue Aug 18, 2019 · 3 comments
Closed

Error running instapy first time #4895

twilsens opened this issue Aug 18, 2019 · 3 comments

Comments

@twilsens
Copy link

Hi all,

Installed instapy successfully, I think 馃槣

Made a simple quickstart.py which likes my own feed but when I run it for the first time I get the following error:

I also attached my quickstart.py

pi@raspberrypi:~/InstaPy $ python3 quickstart.py

.. .. .. .. .. .. .. ..
Workspace in use: "/home/pi/InstaPy"

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-08-18 12:30:07] [utpeertje] Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
INFO [2019-08-18 12:30:07] [utpeertje] -- Connection Checklist [1/3] (Internet Connection Status)
INFO [2019-08-18 12:30:08] [utpeertje] - Internet Connection Status: ok
INFO [2019-08-18 12:30:08] [utpeertje] - Current IP is "85.145.xxx.xxx" and it's from "Netherlands/NL"
INFO [2019-08-18 12:30:09] [utpeertje] -- Connection Checklist [2/3] (Instagram Server Status)
INFO [2019-08-18 12:30:24] [utpeertje] - Instagram WebSite Status: Currently Up
INFO [2019-08-18 12:30:24] [utpeertje] - Instagram Response Time: 49.693 ms
INFO [2019-08-18 12:30:24] [utpeertje] - Instagram Reponse Code: 200
INFO [2019-08-18 12:30:24] [utpeertje] - Instagram Server Status: ok
INFO [2019-08-18 12:30:25] [utpeertje] -- Connection Checklist [3/3] (Hide Selenium Extension)
INFO [2019-08-18 12:30:25] [utpeertje] - window.navigator.webdriver response: False
INFO [2019-08-18 12:30:25] [utpeertje] - Hide Selenium Extension: ok
Cookie file not found, creating cookie...
Login A/B test detected! Trying another string...

.......................................................................................................................
CRITICAL [2019-08-18 12:30:45] [utpeertje] Unable to login to Instagram! You will find more information in the logs above.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

INFO [2019-08-18 12:30:47] [utpeertje] Sessional Live Report:
|> No any statistics to show

[Session lasted 59.33 seconds]

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

from instapy import InstaPy
from instapy import smart_run

login credentials

insta_username = 'utpeertje'
insta_password = 'Xxxx'

comments = [u':heart::white_circle::yellow_heart: @{}',
u':heart::thought_balloon::yellow_heart: @{}']

get an InstaPy session!

set headless_browser=True to run InstaPy in the background

session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=False)

with smart_run(session):
""" Activity flow """

general settings

session.like_by_feed(amount=100, randomize=True, unfollow=False, interact=True)
INFO [2019-08-18 12:30:47] [utpeertje] Session ended!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo

@twilsens
Copy link
Author

Solution from @Mr-HaleYa worked for me also!!

@marcosgb
Copy link

Which one ??

@Mr-HaleYa
Copy link
Contributor

To anybody still having this issue on 6.1
Its caused by a typo in the file xpath_compile.py

Line 159 "login_elem_no_such_exception": "//a[text()='Log``` In']",

It looks like this ^^^

It needs to look like this

Line 159 "login_elem_no_such_exception": "//button[text()='Log In']",

It will still throw the statement Login A/B test detected! Trying another string... but then it should login...

It most likely will ask for a security code that will be sent to your email, just enter that and you should be all set!

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

3 participants