ping / instagram_private_api

A Python library to access Instagram's private API.
MIT License
2.95k stars 612 forks source link

user_detail_info not work for private acc #313

Closed EsmaeiliSina closed 3 years ago

EsmaeiliSina commented 3 years ago

Please follow the guide below


Before submitting an issue, make sure you have:

Which client are you using?


Describe the Bug/Error:

api.user_detail_info() return not found error for private acc but work fine with public ones.


Paste the output of python -V here: Python 3.8.2

Code:

# Example code that will produce the error reported
from instagram_web_api import Client

api = Client(username,password)
user_details = api.user_detail_info('private_acc')

Error/Debug Log:


Traceback (most recent call last):
  \venv\Lib\site-packages\instagram_private_api\client.py", line 523, in _call_api
    response = self.opener.open(req, timeout=self.timeout)
  \Python\Python38-32\Lib\urllib\request.py", line 531, in open
    response = meth(req, response)
  \Python\Python38-32\Lib\urllib\request.py", line 640, in http_response
    response = self.parent.error(
  \Python\Python38-32\Lib\urllib\request.py", line 569, in error
    return self._call_chain(*args)
  \Python\Python38-32\Lib\urllib\request.py", line 502, in _call_chain
    result = func(*args)
 \Python\Python38-32\Lib\urllib\request.py", line 649, 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):
\venv\Lib\site-packages\flask\app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
\venv\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
\venv\Lib\site-packages\flask\app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
\venv\Lib\site-packages\flask\_compat.py", line 39, in reraise
    raise value
\venv\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
\venv\Lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
\venv\Lib\site-packages\flask\app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
\venv\Lib\site-packages\flask\_compat.py", line 39, in reraise
    raise value
\venv\Lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
\venv\Lib\site-packages\flask\app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
\app\views.py", line 15, in index
    details = api.user_detail_info(username)
\Lib\site-packages\instagram_private_api\endpoints\users.py", line 47, in user_detail_info
    res = self._call_api(endpoint, query=kwargs)
\venv\Lib\site-packages\instagram_private_api\client.py", line 527, in _call_api
    ErrorHandler.process(e, error_response)
\venv\Lib\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
EsmaeiliSina commented 3 years ago

EXPERIMENTAL ENDPOINT, INADVISABLE TO USE. Get user detailed info