Datalux / Osintgram

Osintgram is a OSINT tool on Instagram. It offers an interactive shell to perform analysis on Instagram account of any users by its nickname
GNU General Public License v3.0
9.51k stars 2.08k forks source link

Error: Expecting value: line 1 column 1 (char 0) #765

Open Mishanea69 opened 1 year ago

Mishanea69 commented 1 year ago

Attempt to login... Error parsing error response: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "/home/kali/.local/lib/python3.9/site-packages/instagram_private_api/client.py", line 523, in _call_api response = self.opener.open(req, timeout=self.timeout) File "/usr/lib/python3.9/urllib/request.py", line 523, in open response = meth(req, response) File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response response = self.parent.error( File "/usr/lib/python3.9/urllib/request.py", line 561, in error return self._call_chain(args) File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain result = func(args) File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/kali/Osintgram/main.py", line 121, in api = Osintgram(args.id, args.file, args.json, args.command, args.output, args.cookies) File "/home/kali/Osintgram/src/Osintgram.py", line 48, in init self.setTarget(target) File "/home/kali/Osintgram/src/Osintgram.py", line 61, in setTarget self.following = self.check_following() File "/home/kali/Osintgram/src/Osintgram.py", line 1159, in check_following return self.api._call_api(endpoint)['user_detail']['user']['friendship_status']['following'] File "/home/kali/.local/lib/python3.9/site-packages/instagram_private_api/client.py", line 527, in _call_api ErrorHandler.process(e, error_response) File "/home/kali/.local/lib/python3.9/site-packages/instagram_private_api/errors.py", line 135, in process raise ClientError(error_msg, http_error.code, error_response) instagram_private_api.errors.ClientError: Not Found

olorunfemz commented 1 year ago

having the same error, have you found a way to solve this yet?

Ibrahim924k commented 1 year ago

Im getting the same error. I have never got this tool working despite of following every step. everytime i reinstall it to try it out i get a new error. this time i have all the files correctly installed tried switching to v2 reinstalled python tried old versions but nothing works. Waiting for the developer to reply hoping that i get to try this tool once

Ibrahim924k commented 1 year ago

for reference this is the error i got

Attempt to login... Error parsing error response: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "/home/ibrahim/Desktop/Osintgram/venv/lib/python3.10/site-packages/instagram_private_api/client.py", line 523, in _call_api response = self.opener.open(req, timeout=self.timeout) File "/usr/lib/python3.10/urllib/request.py", line 525, in open response = meth(req, response) File "/usr/lib/python3.10/urllib/request.py", line 634, in http_response response = self.parent.error( File "/usr/lib/python3.10/urllib/request.py", line 563, in error return self._call_chain(args) File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain result = func(args) File "/usr/lib/python3.10/urllib/request.py", line 643, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ibrahim/Desktop/Osintgram/main.py", line 125, in api = Osintgram(args.id, args.file, args.json, args.command, args.output, args.cookies) File "/home/ibrahim/Desktop/Osintgram/src/Osintgram.py", line 47, in init self.setTarget(target, True) File "/home/ibrahim/Desktop/Osintgram/src/Osintgram.py", line 61, in setTarget self.following = self.check_following() File "/home/ibrahim/Desktop/Osintgram/src/Osintgram.py", line 176, in check_following return self.api._call_api(endpoint)['user_detail']['user']['friendship_status']['following'] File "/home/ibrahim/Desktop/Osintgram/venv/lib/python3.10/site-packages/instagram_private_api/client.py", line 527, in _call_api ErrorHandler.process(e, error_response) File "/home/ibrahim/Desktop/Osintgram/venv/lib/python3.10/site-packages/instagram_private_api/errors.py", line 135, in process raise ClientError(error_msg, http_error.code, error_response) instagram_private_api.errors.ClientError: Not Found

cyberducky0o0 commented 1 year ago

I found the solution,

First, the error: the http response is returning an html output. We are expecting a json format, thus the parsing error in the first block.

Why is this returning an http response? Looking into the instagram-private-api library, we see that there is an authentication issue.

Solution Flow:

  1. Use a username and password and then use that username as the victim, (this worked)
  2. Since the above worked, the program itself is not the issue.
  3. The issue lies in the authentication of your account with instagram
  4. One thought, since I just made this (BOT) account, it could be that there is an account life time that needs to true in order for the apis to work.
  5. I used an older bot account and was able to get it working!
  6. Use an older IG account or get a developer account.

FOLLOW ME ON YT!