Closed steevenakintilo closed 8 months ago
I'm on Fedora36
Can you share the arguments you used for the script?
yes here it is: python ilcbot.py -u no_world_record -p sangokuhomer1 -t 433 -np 2
I think the target is the problem, -t needs to have an account or tag for example:
-t "#berlin"
Also, I would edit your comment and remove the password you shared.
Already changed the password got the same error with this python ilcbot.py -u akesqfqsfsqfn -p sqfqsfsf -t "berlin" -np 10
-u - p where with right account info
@steevenakintilo Deleted your comment because of username/password. Is 2-factor authentication enabled? If yes, you may have to type in the code.
No need to delete the comment I changed the password and it's just 6 years old account I just used for testing this so it's fine but I don't have 2 factor authentification on any of my instagram accounts
anche a me da lo stesso errore e non ho autenticazione a due fattori
Me too
Me too
Please share the logs (after hiding your username)
Me too
Please share the logs (after hiding your username)
[2023-09-24 14:04:19,426]:[ilcbot]:[
The password was correct and i do not have 2 factor ver(disabled for using the bot)
Me too
Please share the logs (after hiding your username)
[2023-09-24 14:04:19,426]:[ilcbot]:[:354]:[INFO]:Total time taken: 14.8958 seconds [2023-09-24 14:04:26,142]:[profile]:[parse_targets_multi:405]:[ERROR]:Error opening file: elonmusk [2023-09-24 14:04:26,144]:[ilcbot]:[:43]:[INFO]:Script started [2023-09-24 14:04:26,145]:[ilcbot]:[:45]:[INFO]:Downloading webdriver for your version of Chrome [2023-09-24 14:04:26,146]:[ilcbot]:[:48]:[INFO]:Loading Instagram [2023-09-24 14:04:31,932]:[ilcbot]:[:60]:[INFO]:Delay: 1-10 secs [2023-09-24 14:04:31,933]:[ilcbot]:[:111]:[INFO]:Attempting to log in with username [2023-09-24 14:04:34,822]:[ilcbot]:[:347]:[ERROR]:Script ended with error [2023-09-24 14:04:34,823]:[ilcbot]:[:348]:[ERROR]:Error: [LoginFailedError] - Failed to login. Incorrect username/password, or 2 factor verification is active. Traceback (most recent call last): File "..\instalike\insta-likecom-bot\ilcbot.py", line 113, in raise LoginFailedError("Failed to login. Incorrect username/password, or 2 factor verification is active.") modules.exceptions.LoginFailedError: Failed to login. Incorrect username/password, or 2 factor verification is active. [2023-09-24 14:04:37,348]:[ilcbot]:[:354]:[INFO]:Total time taken: 11.2059 seconds
The password was correct and i do not have 2 factor ver(disabled for using the bot)
What's the version of the script you're using?
Me too
Please share the logs (after hiding your username)
[2023-09-24 14:04:19,426]:[ilcbot]:[:354]:[INFO]:Total time taken: 14.8958 seconds [2023-09-24 14:04:26,142]:[profile]:[parse_targets_multi:405]:[ERROR]:Error opening file: elonmusk [2023-09-24 14:04:26,144]:[ilcbot]:[:43]:[INFO]:Script started [2023-09-24 14:04:26,145]:[ilcbot]:[:45]:[INFO]:Downloading webdriver for your version of Chrome [2023-09-24 14:04:26,146]:[ilcbot]:[:48]:[INFO]:Loading Instagram [2023-09-24 14:04:31,932]:[ilcbot]:[:60]:[INFO]:Delay: 1-10 secs [2023-09-24 14:04:31,933]:[ilcbot]:[:111]:[INFO]:Attempting to log in with username [2023-09-24 14:04:34,822]:[ilcbot]:[:347]:[ERROR]:Script ended with error [2023-09-24 14:04:34,823]:[ilcbot]:[:348]:[ERROR]:Error: [LoginFailedError] - Failed to login. Incorrect username/password, or 2 factor verification is active. Traceback (most recent call last): File "..\instalike\insta-likecom-bot\ilcbot.py", line 113, in raise LoginFailedError("Failed to login. Incorrect username/password, or 2 factor verification is active.") modules.exceptions.LoginFailedError: Failed to login. Incorrect username/password, or 2 factor verification is active. [2023-09-24 14:04:37,348]:[ilcbot]:[:354]:[INFO]:Total time taken: 11.2059 seconds The password was correct and i do not have 2 factor ver(disabled for using the bot)
What's the version of the script you're using?
version v.3.0.3
Same error for me (can´t login), but if i manually accept cookies fast in the browser, i can see the login in browser was done ok and i can see account details, but browser close fast:
modules.exceptions.LoginFailedError: Failed to login. Incorrect username/password, or 2 factor verification is active.
[2023-12-03 12:19:34,692]:[ilcbot]:[
@shulogsm I need to recreate the issue to be able to fix it. I would need these information:
Hi @shine-jayakumar:
I have managed to solve the problem. You are indeed on the right track when you ask me about the language of my browser (Spanish in my case) and the cookies anouncement. To solve the problem, I have played in two different areas:
insta.py:
def validate_login(self) -> bool:
"""
Validates login
"""
wait = WebDriverWait(self.driver, 50)
user_profile_xpaths = [
**'//img[contains(@alt, "Foto del perfil ")]', // this line was changed to spanish**
'//div[@class="_acut"]/div/span/img',
'//img[@data-testid="user-avatar"]'
]
On the other hand, I think the cookie ad was also annoying for some reason, so I've added a click to the option that rejects cookies:
def login(self, validate=True) -> bool:
"""
Initiates login with username and password
"""
try:
self.driver.get(self.baseurl).
**self.wait.until(EC.presence_of_element_located((By.XPATH, '//button[@class="_a9-- _ap36 _a9_1"]')')).click()
time.sleep(3) // reject cookies **
self.wait.until(EC.presence_of_element_located((By.XPATH, '//input[@name="username"]'))).send_keys(self.username)
self.wait.until(EC.presence_of_element_located((By.XPATH, '//input[@name="password"]')')).send_keys(self.password)
self.wait.until(EC.presence_of_element_located((By.XPATH, '//button[@type="submit"]')))).click()
time.sleep(4)
Hope this can help to all people here. Thanks for your great work!
Hi @shine-jayakumar:
I have managed to solve the problem. You are indeed on the right track when you ask me about the language of my browser (Spanish in my case) and the cookies anouncement. To solve the problem, I have played in two different areas:
insta.py:
def validate_login(self) -> bool: """ Validates login """ wait = WebDriverWait(self.driver, 50) user_profile_xpaths = [ **'//img[contains(@alt, "Foto del perfil ")]', // this line was changed to spanish** '//div[@class="_acut"]/div/span/img', '//img[@data-testid="user-avatar"]' ]
On the other hand, I think the cookie ad was also annoying for some reason, so I've added a click to the option that rejects cookies:
def login(self, validate=True) -> bool: """ Initiates login with username and password """ try: self.driver.get(self.baseurl). **self.wait.until(EC.presence_of_element_located((By.XPATH, '//button[@class="_a9-- _ap36 _a9_1"]')')).click() time.sleep(3) // reject cookies ** self.wait.until(EC.presence_of_element_located((By.XPATH, '//input[@name="username"]'))).send_keys(self.username) self.wait.until(EC.presence_of_element_located((By.XPATH, '//input[@name="password"]')')).send_keys(self.password) self.wait.until(EC.presence_of_element_located((By.XPATH, '//button[@type="submit"]')))).click() time.sleep(4)
Hope this can help to all people here. Thanks for your great work!
Great job @shulogsm 👏
I'm still getting the same errors and my browser is not in spanish heh.
Hello I've tried to login to several accounts but I always got the same error I don't know why `/home/asteeven/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/requests/init.py:102: RequestsDependencyWarning: urllib3 (1.26.8) or chardet (5.1.0)/charset_normalizer (2.0.11) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported " [*] => Error opening file: 433
[] => Script started [] => Downloading webdriver for your version of Chrome [] => Loading Instagram [] => Delay: 1-10 secs [] => Attempting to log in with akintilo_steeven [] => Script ended with error [] => Error: [LoginFailedError] - Failed to login. Incorrect username/password, or 2 factor verification is active. Traceback (most recent call last): File "/home/asteeven/Python/instaaa/insta-likecom-bot/ilcbot.py", line 113, in
raise LoginFailedError("Failed to login. Incorrect username/password, or 2 factor verification is active.")
modules.exceptions.LoginFailedError: Failed to login. Incorrect username/password, or 2 factor verification is active.
[ ] => Total time taken: 3.4561 seconds
`