new92 / IGFI

🤖 IGFI: InstaGram Followers Increaser 📈 | Written in Python 🐍 | Don't forget to ⭐ the repo !
https://github.com/new92/IGFI
MIT License
218 stars 62 forks source link

auth problem #69

Open R3n3r0 opened 6 months ago

R3n3r0 commented 6 months ago

On linux i get authentication error even after generating the cookie. below is the error log:

` Status 429: Too many requests Ignore 429: Continue login Traceback (most recent call last): File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 298, in _send_private_request response.raise_for_status() File "/tmp/IGFI/venv/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/tmp/IGFI/igfi.py", line 648, in main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.strip().replace('\', '/')) File "/tmp/IGFI/igfi.py", line 348, in main login = client.login(username, password) File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/auth.py", line 391, in login logged = self.private_request("accounts/login/", data, login=True) File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 445, in private_request raise e File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 432, in private_request self._send_private_request(endpoint, kwargs) File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 354, in _send_private_request raise UnknownError(last_json) instagrapi.exceptions.UnknownError: You'll need to update Instagram to the latest version before you can use the app. `

new92 commented 6 months ago

Hey @R3n3r0 try the following: 1) Updating your browser in the latest version 2) Updating your Instagram app 3) Logout from your Instagram account (from the browser) and login again

bruise24 commented 5 months ago

Same here to me! already done what you said and nothing occurs =\

new92 commented 5 months ago

Hmm, ok let me check it and I'll get back to you ! @bruise24 you too are using Linux correct ?

bruise24 commented 5 months ago

Curiously I'm on Windows. But error is the same. Thank you

new92 commented 5 months ago

Ok and both @R3n3r0 @bruise24 are using Firefox correct ?

R3n3r0 commented 5 months ago

Yes

bruise24 commented 5 months ago

Yes I'm using it too.

new92 commented 5 months ago

Ok got it

bruise24 commented 5 months ago

Thank you!

new92 commented 5 months ago

@R3n3r0 @bruise24 Can you try using it one more time ? I made some changes and hopefuly they resolved the issue.

bruise24 commented 5 months ago

Still give me this error friend:

Traceback (most recent call last): File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 298, in _send_private_request response.raise_for_status() File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\USUARIO\Desktop\IGFI\igfi.py", line 648, in main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.strip().replace('\', '/')) File "C:\Users\USUARIO\Desktop\IGFI\igfi.py", line 348, in main login = client.login(username, password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\auth.py", line 391, in login logged = self.private_request("accounts/login/", data, login=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 445, in private_request raise e File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 432, in private_request self._send_private_request(endpoint, kwargs) File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 354, in _send_private_request raise UnknownError(last_json) instagrapi.exceptions.UnknownError: You'll need to update Instagram to the latest version before you can use the app.

new92 commented 5 months ago

@bruise24 I see, try entering this command: pip install --upgrade instagrapi

bruise24 commented 5 months ago

@bruise24 I see, try entering this command: pip install --upgrade instagrapi

Working now! Thank you so much for your effort

bruise24 commented 5 months ago

Hello friend.

It worked one time. Now it just doesn't seem to log in.

Don't pass from here:

[+] Attempting to login using.....

new92 commented 5 months ago

Hi,

Ok that's a tough one. I reviewed the code and can't figure out why's acting that way. After the message you mentioned it should print something like: "[✔] Login successful !" or "[✘] Failed to login." . Maybe you modified the source code in any way ? Or you're using an older version of IGFI. If that's the case try these commands:

cd IGFI
git pull

And then repeat the process from the beginning. (python3 cookies.py etc.). And let me know if that works.

bruise24 commented 5 months ago

It worked friend!

Now is this one =( :

[+] Following Real Madrid... [✔] Ok [+] Following Champions League... [✔] Ok Traceback (most recent call last): File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 359, in _send_private_request response.raise_for_status() File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://i.instagram.com/api/v1/friendships/create/29394004/

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\USUARIO\Desktop\IGFI\igfi.py", line 648, in main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.strip().replace('\', '/')) File "C:\Users\USUARIO\Desktop\IGFI\igfi.py", line 401, in main client.user_follow(users[NAMES[j]]) File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\user.py", line 821, in user_follow result = self.private_request(f"friendships/create/{user_id}/", data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 541, in private_request raise e File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 526, in private_request self._send_private_request(endpoint, kwargs) File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 385, in _send_private_request raise LoginRequired(response=e.response, last_json) instagrapi.exceptions.LoginRequired: login_required

new92 commented 5 months ago

Great ! Ok that's a common one. All you have to do is login to your Instagram account via your browser preferably Firefox. Then execute again IGFI.

lukaszflorczak commented 4 months ago

Hi @new92. I upgraded instagrapi and now have this problem:

Status 429: Too many requests
Ignore 429: Continue login
Traceback (most recent call last):
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 298, in _send_private_request
    response.raise_for_status()
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/lukaszflorczak/ig/IGFI/./igfi.py", line 648, in <module>
    main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.strip().replace('\\', '/'))
  File "/Users/lukaszflorczak/ig/IGFI/./igfi.py", line 348, in main
    login = client.login(username, password)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/auth.py", line 391, in login
    logged = self.private_request("accounts/login/", data, login=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 445, in private_request
    raise e
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 432, in private_request
    self._send_private_request(endpoint, **kwargs)
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 354, in _send_private_request
    raise UnknownError(**last_json)
instagrapi.exceptions.UnknownError: You'll need to update Instagram to the latest version before you can use the app.

I'm logged in Firefox. I use Mac OS

new92 commented 4 months ago

Hey @lukaszflorczak ok try updating also the instaloader module in its latest version and run again IGFI.

new92 commented 4 months ago

@lukaszflorczak did it work ?

lukaszflorczak commented 4 months ago

Nope

new92 commented 2 months ago

@lukaszflorczak so I researched the issue you mentioned and the problem appears to be in the IP address you're using. So in order to resolve that you'll need to either use a proxy or a VPN and run IGFI again.