Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPError "Forbidden" with version 1.5.1 #66

Closed
6 of 10 tasks
em1le opened this issue Apr 10, 2018 · 0 comments
Closed
6 of 10 tasks

HTTPError "Forbidden" with version 1.5.1 #66

em1le opened this issue Apr 10, 2018 · 0 comments

Comments

@em1le
Copy link

em1le commented Apr 10, 2018

Please follow the guide below

  • Issues submitted without this template format will be ignored.
  • You will be asked some questions and requested to provide some information, please read them carefully and answer completely.
  • Do not post screenshots of error messages or code.
  • Put an x into all the boxes [ ] relevant to your issue (like so [x] no spaces).
  • Use the Preview tab to see how your issue will actually look like.
  • Issues about reverse engineering is out of scope and will be closed without response.

Before submitting an issue, make sure you have:

  • Updated to the lastest version v1.5.1
  • Read the README and docs
  • Searched the bugtracker for similar issues including closed ones
  • Reviewed the sample code in tests and examples

Which client are you using?

  • app (instagram_private_api/)
  • web (instagram_web_api/)

Purpose of your issue?

  • Bug report (encountered problems/errors)
  • Feature request (request for a new functionality)
  • Question
  • Other

For a bug report, you must include the Python version used, code that will reproduce the error, and the error log/traceback.

Paste the output of python -V here: Python 2.7.14

Code:

from instagram_web_api import Client, ClientError

api = Client(auto_patch=True, drop_incompat_keys=False)
api.user_feed(user_id, end_cursor=0, count=500)

Error/Debug Log:

Traceback (most recent call last):
  File "/home/Project/virtualenv/project/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/Project/virtualenv/project/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/Project/src/project/instagram/tasks.py", line 272, in run
    import_options
  File "/home/Project/src/project/instagram/tasks.py", line 294, in run_import
    posts = query_posts(credentials)
  File "/home/Project/src/project/instagram/tasks.py", line 175, in query_posts
    found = api.user_feed(user_id, end_cursor=end_cursor, count=count)
  File "/home/Project/virtualenv/local/lib/python2.7/site-packages/instagram_web_api/client.py", line 354, in user_feed
    info = self._make_request(self.GRAPHQL_API_URL, query=query)
  File "/home/Project/virtualenv/local/lib/python2.7/site-packages/instagram_web_api/client.py", line 244, in _make_request
    raise ClientError('HTTPError "{0!s}" while opening {1!s}'.format(e.reason, url), e.code)
ClientError: HTTPError "Forbidden" while opening https://www.instagram.com/graphql/query/?query_id=17888483320059182&id=964600893&first=500

Describe your issue

The url for the request is good (json response is displayed within chromium).
There is something in the construction of the request that does not work anymore.

@em1le em1le changed the title HTTPError "Forbidden" HTTPError "Forbidden" with version 1.5.1 Apr 10, 2018
@ping ping closed this as completed in bd776f1 Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant