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.52k stars 2.09k forks source link

raise JSONDecodeError #32

Closed sniper199 closed 4 years ago

sniper199 commented 4 years ago

Hello @Datalux i had this problems raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Attempt to login... Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/instagram_private_api/client.py", line 523, in _call_api response = self.opener.open(req, timeout=self.timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 569, in error return self._call_chain(args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(args) File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "main.py", line 77, in api = Osintgram(args.id, args.file, args.json) File "/root/Osintgram/src/Osintgram.py", line 28, in init self.api = AppClient(auto_patch=True, authenticate=True, username=u, password=p) File "/usr/local/lib/python3.8/dist-packages/instagram_private_api/client.py", line 208, in init self.login() File "/usr/local/lib/python3.8/dist-packages/instagram_private_api/endpoints/accounts.py", line 49, in login login_response = self._call_api( File "/usr/local/lib/python3.8/dist-packages/instagram_private_api/client.py", line 527, in _call_api ErrorHandler.process(e, error_response) File "/usr/local/lib/python3.8/dist-packages/instagram_private_api/errors.py", line 135, in process raise ClientError(error_msg, http_error.code, error_response) instagram_private_api.errors.ClientError: Bad Request: rate_limit_error

Datalux commented 4 years ago

Hi @sniper199 thank you for submitting this issue. This problem is related to the limit imposed by Instagram on the requests number (see https://developers.facebook.com/docs/graph-api/overview/rate-limiting#instagram).

In the next release I'll include a better exception management.