Stuck after login page.
Ubuntu 18.04 64 bits.
@kbruno89 have you solved?
i have the exact same error; (
i can't find a solution
@kbruno89 have you solved?
i have the exact same error; (
i can't find a solution
No. :(
Waiting for solution.
@timgrossmann
could you help us in any way?
Did you try to delete the content of "logs" folder?
@zubus
i tried to delete the folder.
and managed to pass the error because?
Guys, disable 2FA on your account. No Google Authentificator, no SMS notification. I installed InstaPy on a fresh new server today and my problem was 2FA via sms which was automaticaly turned on by instagram.
@filipstrapinadotcz
I have everything disabled .. the only solution would be to delete the logs folder .. but immediately after the error repeats itself
@Polkyanik paste here your quickstart.py (hide username and password OFC) and also paste output form "pip list"
import random, time, traceback
from instapy import InstaPy
from instapy import smart_run
from instapy import set_workspace
set_workspace(path=None)
insta_username = '----------'
insta_password = '-------'
dont_like = ['#dick', '#squirt', 'R.I.P','#sad']
random_targets = ['milk_magazine']
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=True,
disable_image_load=True,
multi_logs=True)
with smart_run(session):
session.set_mandatory_language(enabled=True, character_set=['LATIN'])
#session.set_blacklist(enabled=True, campaign='blacklist')
session.set_quota_supervisor(enabled=True, sleep_after=["follows", "unfollows", "server_calls"],
sleepyhead=True,
stochastic_flow=True,
notify_me=True,
peak_follows_hourly=18,
peak_follows_daily=None,
peak_unfollows_hourly=26,
peak_unfollows_daily=None,
peak_server_calls_hourly=188,
peak_server_calls_daily=4200)
session.set_simulation(enabled=True, percentage=73)
session.set_action_delays(enabled=True,
follow=16.88,
unfollow=14.91,
randomize=True,
random_range_from=214,
random_range_to=447)
#session.set_dont_include(friend_list)
session.set_relationship_bounds(enabled=True,
potency_ratio=1.12,
delimit_by_numbers=True,
max_followers=46880,
max_following=26880,
max_posts=1000,
min_posts=6,
min_followers=6,
min_following=6)
session.set_skip_users(skip_private=True, private_percentage=74,
skip_no_profile_pic=True, no_profile_pic_percentage=100,
skip_bio_keyword = dont_like,
skip_business=True)
session.set_do_follow(enabled=True, percentage=58, times=1)
session.set_user_interact(amount=3,
randomize=True,
percentage=50,
media='Photo')
#WARNIG ERROR - ASPETTARE AGGIORNAMENTO unfollow_util.py
#Couldn't find liked counter button. May be a video. Moving on..
session.follow_likers(random_targets, photos_grab_amount = 12, follow_likers_per_photo = 6, randomize=False, sleep_delay=927, interact=False)
session.follow_commenters(random_targets, amount=7, daysold=62, max_pic = 14, sleep_delay=1412, interact=False)
session.follow_user_followers(random_targets,
amount=217,
randomize=True,
sleep_delay=1216)
session.unfollow_users(amount=random.randint(428, 682),
#custom_list_param="all" or "nonFollowers"
custom_list_enabled=False, custom_list=["unfollowthis", "unfollowthat", "unfollowthistoo", "unfollowthattoo"], custom_list_param="all",
#instapy_followed_param="all" or "nonFollowers"
instapy_followed_enabled=True, instapy_followed_param="all",
nonFollowers=False,
allFollowing=False,
style="FIFO",
unfollow_after=40*60*60,
sleep_delay=1826)
#end the bot session
Hi,
I created a function to login as a palliative.
from instapy import InstaPy
def getSession(usr,pwd,hideBrowser):
logged = False
try:
session = InstaPy(username=usr,
password=pwd,
headless_browser=hideBrowser,
multi_logs=True)
session.login()
logged = True
except:
if not logged:
session.end()
getSession(usr,pwd,hideBrowser)
return session
According to the returned command the script does not search for the "Log In" button. There are two cases when this can happen:
1) Log in automatically from the login screen and go to the Imstagram dashboard - You should log out while the bot is working after the "Timed..." message. and click "Log In" manually - the bot will immediately start filling in the login form
It happens to me once in a couple of times. I don't know why. But I use the above mentioned method and it works.
@filiperivelli
great !!
I try immediately
@filiperivelli
Hi ,
could you help me?
where am i wrong?
Instapy does not start and now I get this error
no any custom workspace provider. -using existing ...
import random, time, traceback
from instapy import InstaPy
from instapy import smart_run
from instapy import set_workspace
set_workspace(path=None)
insta_username = '----------'
insta_password = '-------'
def getSession(insta_username,insta_password,hideBrowser):
logged = False
try:
session = InstaPy(username=insta_username,
password=insta_password ,
headless_browser=hideBrowser,
multi_logs=True)
session.login()
logged = True
#activity
session.set_do_like(enabled=True, percentage=70)
# Like posts based on hashtags
session.like_by_tags(['natgeo', 'world'], amount=10)
except:
if not logged:
session.end()
getSession(insta_username,insta_password,hideBrowser)
return session
Raspberry Pi 4
InstaPy Version: 0.6.11
Mozilla Firefox 68.12.0esr
geckodriver 0.23.0 ( 2018-10-04)
python3.7
selenium 3.141.0
After changing a little bit the tracing level in Main branch I discovered that page_title now is waiting for a different title. explicit_wait is working fine after fixing the string.
Verifying last changes in code before merge request.
Before:
ERROR [2020-10-04 22:08:27] [internet] Timed out with failure while explicitly waiting until title contains 'Log In' string!
After:
INFO [2020-10-04 23:10:26] [internet] Creating new cookie...
INFO [2020-10-04 23:10:46] [internet] Logged in successfully!
@elulcao
I have updated all the codes .. but I can't get over the error.
but I can't find page_title, where is it?
Do I have to change it to something else or add that explicit_wait?
tnx
@elulcao
Fantastic !!
text right away!
thank you (Y)
@elulcao
nothing to do;(
I updated the files in direct ...
keeping the browser open I see that it locks on the second cookie screen and cannot pass the second step on the browser to accept cookies .. after which it crashes
how can I understand which one it is the problem ?
Raspberry Pi 4
InstaPy Version: 0.6.11
Mozilla Firefox 68.12.0esr
geckodriver 0.23.0 ( 2018-10-04)
python3.7
selenium 3.141.0
@Polkyanik
Try removing the cookie.pkl file under your workspace.
Enable the geckodriver trace to check what was the last call to Instagram service.
Restart your insta.py
wait until the safe info screen...
Not sure why your browser crashes, some logs are needed to debug it
I tried in my box and logged successfully after created a new pkl.
I'm using FF 81.0.1 and geckodriver 0.27 with python 3.8.2 Catalina
My ubuntu VBox is FF 80.0.1 and geckodriver 80.0.1+build1-0ubuntu0.18.04.1 with python 3.8.0
here the trace for reference:
1601930775649 is Tuesday, 6 October 2020 20:57:58.015
INFO [2020-10-06 15:57:52] [internet] - Hide Selenium Extension: ok
INFO [2020-10-06 15:57:55] [internet] Cookie file not found, creating cookie... <== HERE
INFO [2020-10-06 15:57:57] [internet] Creating new cookie...
login_page_title = "Instagram"
explicit_wait(browser, "TC", login_page_title, logger)
# wait until the 'username' input element is located and visible
input_username_XP = read_xpath(login_user.__name__, "input_username_XP")
...
xpath["login_user"] = {
"input_password": "//input[@name='password']",
"input_username_XP": "//input[@name='username']",
...
`bash
1602017878015 Marionette DEBUG 0 -> [0,20,"WebDriver:GetTitle",{}]
1602017878016 Marionette DEBUG 0 <- [1,20,null,{"value":"Instagram"}]
1602017878017 webdriver::server DEBUG <- 200 OK {"value":"Instagram"}
1602017878018 webdriver::server DEBUG -> POST /session/d1c4993d-f139-d64f-8c53-3ff9e6d1/element {"using": "xpath", "value": "//input[@name='username']"}
1602017878018 Marionette DEBUG 0 -> [0,21,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
@elulcao
that is, sorry if I stress you,
but I find myself with this error; (
I activated the geckodriver log that I am going to show you below ...
when you have two minutes could you check me out what's wrong, (; (
thank you for now
1602087028209 Marionette DEBUG 0 -> [0,20,"WebDriver:GetTitle",{}]
1602087028211 Marionette DEBUG 0 <- [1,20,null,{"value":"Instagram"}]
1602087028212 webdriver::server DEBUG <- 200 OK {"value":"Instagram"}
1602087028215 webdriver::server DEBUG -> POST /session/de2a464a-72dd-496e-afdb-40922f77cd3d/element {"using": "xpath", "value": "//input[@name='username']"}
1602087028217 Marionette DEBUG 0 -> [0,21,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
1602087033236 Marionette DEBUG 0 <- [1,21,{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError ... entError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"},null]
1602087033242 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nNoSuchElementError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"}}
1602087033746 webdriver::server DEBUG -> POST /session/de2a464a-72dd-496e-afdb-40922f77cd3d/element {"using": "xpath", "value": "//input[@name='username']"}
1602087033749 Marionette DEBUG 0 -> [0,22,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
1602087038762 Marionette DEBUG 0 <- [1,22,{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError ... entError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"},null]
1602087038764 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nNoSuchElementError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"}}
1602087039268 webdriver::server DEBUG -> POST /session/de2a464a-72dd-496e-afdb-40922f77cd3d/element {"using": "xpath", "value": "//input[@name='username']"}
1602087039271 Marionette DEBUG 0 -> [0,23,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
1602087044282 Marionette DEBUG 0 <- [1,23,{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError ... entError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"},null]
1602087044283 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nNoSuchElementError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"}}
1602087044788 webdriver::server DEBUG -> POST /session/de2a464a-72dd-496e-afdb-40922f77cd3d/element {"using": "xpath", "value": "//input[@name='username']"}
1602087044791 Marionette DEBUG 0 -> [0,24,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
1602087049807 Marionette DEBUG 0 <- [1,24,{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError ... entError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"},null]
1602087049808 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nNoSuchElementError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"}}
1602087050313 webdriver::server DEBUG -> POST /session/de2a464a-72dd-496e-afdb-40922f77cd3d/element {"using": "xpath", "value": "//input[@name='username']"}
1602087050316 Marionette DEBUG 0 -> [0,25,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
1602087055326 Marionette DEBUG 0 <- [1,25,{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError ... entError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"},null]
1602087055328 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nNoSuchElementError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"}}
1602087055833 webdriver::server DEBUG -> POST /session/de2a464a-72dd-496e-afdb-40922f77cd3d/element {"using": "xpath", "value": "//input[@name='username']"}
1602087055836 Marionette DEBUG 0 -> [0,26,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
1602087060854 Marionette DEBUG 0 <- [1,26,{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError ... entError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"},null]
1602087060856 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nNoSuchElementError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"}}
1602087061361 webdriver::server DEBUG -> POST /session/de2a464a-72dd-496e-afdb-40922f77cd3d/element {"using": "xpath", "value": "//input[@name='username']"}
1602087061364 Marionette DEBUG 0 -> [0,27,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
1602087066376 Marionette DEBUG 0 <- [1,27,{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError ... entError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"},null]
1602087066378 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nNoSuchElementError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"}}
1602087066884 webdriver::server DEBUG -> POST /session/de2a464a-72dd-496e-afdb-40922f77cd3d/element {"using": "xpath", "value": "//input[@name='username']"}
1602087066888 Marionette DEBUG 0 -> [0,28,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
1602087071900 Marionette DEBUG 0 <- [1,28,{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError ... entError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"},null]
1602087071902 webdriver::server DEBUG <- 404 Not Found {"value":{"error":"no such element","message":"Unable to locate element: //input[@name='username']","stacktrace":"WebDriverError@chrome://marionette/content/error.js:175:5\nNoSuchElementError@chrome://marionette/content/error.js:387:5\nelement.find/<@chrome://marionette/content/element.js:343:16\n"}}
1602087071907 webdriver::server DEBUG -> GET /session/de2a464a-72dd-496e-afdb-40922f77cd3d/source
1602087071909 Marionette DEBUG 0 -> [0,29,"WebDriver:GetPageSource",{}]
1602087071927 Marionette DEBUG 0 <- [1,29,null,{"value":"
One of the ways we use cookies is to show you useful and relevant ads on and off Instagram. You can read more about the ways we use cookies in our Cookie Policy. You can control how we use data to show you ads by using the tools described below.
Follow the instructions provided by your website or mobile browser (usually located within the \"Help\", \"Tools\" or \"Edit\" facility) to modify your cookie settings. Please note that if you set your browser to disable cookies or other technologies, you may not be able to access certain parts of our Service and other parts of our Service may not work properly.
To learn more about the choices that advertisers provide generally for individuals to influence how information about their online activities over time and across third-party Web sites or online services is collected and used, visit the Network Advertising Initiative, the Digital Advertising Alliance, or the European Digital Advertising Alliance.
In addition, your browser or device may offer settings that allow you to choose whether browser cookies are set and to delete them. These controls vary by browser, and manufacturers may change both the settings they make available and how they work at any time. As of 5 October 2020, you may find additional information about the controls offered by popular browsers at the links below. Certain parts of the Facebook Products may not work properly if you have disabled browser cookie use. Please be aware these controls are distinct from the controls that Facebook offers you.
Raspberry Pi 4
InstaPy Version: 0.6.11
Mozilla Firefox 68.12.0esr
geckodriver 0.23.0 ( 2018-10-04)
python3.7
selenium 3.141.0
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this problem still occurs, please open a new issue
Tried with Ubuntu 18.04 and Python 3.7
(venv) ubuntu@ubuntu-18:~/GitHub/InstaPy$ python --version
Python 3.7.5
(venv) ubuntu@ubuntu-18:~/GitHub/InstaPy$
(venv) ubuntu@ubuntu-18:~/GitHub/InstaPy$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
(venv) ubuntu@ubuntu-18:~/GitHub/InstaPy$ apt list --installed | grep gecko
firefox-geckodriver/bionic-updates,bionic-security,now 82.0.3+build1-0ubuntu0.18.04.1 amd64 [installed]
(venv) ubuntu@ubuntu-18:~/GitHub/InstaPy$ firefox --version
Mozilla Firefox 82.0.3
InstaPy Version: 0.6.12
._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "/home/ubuntu/InstaPy"
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2020-11-16 11:58:37] [internet] Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
INFO [2020-11-16 11:58:37] [internet] -- Connection Checklist [1/2] (Internet Connection Status)
INFO [2020-11-16 11:58:37] [internet] - Internet Connection Status: ok
INFO [2020-11-16 11:58:37] [internet] - Current IP is "0.0.0.0" and it's from "AC/DC"
INFO [2020-11-16 11:58:37] [internet] -- Connection Checklist [2/2] (Hide Selenium Extension)
INFO [2020-11-16 11:58:37] [internet] - window.navigator.webdriver response: None
INFO [2020-11-16 11:58:37] [internet] - Hide Selenium Extension: ok
WARNING [2020-11-16 11:58:40] [internet] Cookie file not found, creating cookie...
INFO [2020-11-16 11:58:57] [internet] Do not save Login Info by now
...................................................................
INFO [2020-11-16 11:59:04] [internet] Logged in successfully!
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Masked sensitive info:
1605549523172 Marionette DEBUG 0 <- [1,20,null,{"value":"Instagram"}]
1605549523173 webdriver::server DEBUG <- 200 OK {"value":"Instagram"}
1605549523173 webdriver::server DEBUG -> POST /session/b388-5565b5ca9c56/element {"using": "xpath", "value": "//input[@name='username']"}
1605549523174 Marionette DEBUG 0 -> [0,21,"WebDriver:FindElement",{"using":"xpath","value":"//input[@name='username']"}]
1605549523175 Marionette DEBUG 0 <- [1,21,null,{"value":{"element-a52e-4f735466cecf":"8e4503e5-6c5c-43d9-33ee1ed"}}]
1605549523175 webdriver::server DEBUG <- 200 OK {"value":{"element-a52e-4f735466cecf":"8e4503e5-6c5c-43d9-88cf-1944b33ee1ed"}}
1605549523176 webdriver::server DEBUG -> POST /session/f1274d85--b388-5565b5ca9c56/execute/sync {"script": "return (function(
Most helpful comment
Hi,
I created a function to login as a palliative.