Advertisement
kopyl

Untitled

Oct 11th, 2024 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.81 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. QueryReturnedBadRequestException          Traceback (most recent call last)
  3. Cell In[5], line 1
  4. ----> 1 il.download_post(instaloader.Post.from_shortcode(il.context, 'DA5uRxXoiAm'), target="ok")
  5.  
  6. File ~/.pyenv/versions/3.8.13/lib/python3.8/site-packages/instaloader/structures.py:207, in Post.from_shortcode(cls, context, shortcode)
  7.     205 # pylint:disable=protected-access
  8.     206 post = cls(context, {'shortcode': shortcode})
  9. --> 207 post._node = post._full_metadata
  10.     208 return post
  11.  
  12. File ~/.pyenv/versions/3.8.13/lib/python3.8/site-packages/instaloader/structures.py:335, in Post._full_metadata(self)
  13.     333 @property
  14.     334 def _full_metadata(self) -> Dict[str, Any]:
  15. --> 335     self._obtain_metadata()
  16.     336     assert self._full_metadata_dict is not None
  17.     337     return self._full_metadata_dict
  18.  
  19. File ~/.pyenv/versions/3.8.13/lib/python3.8/site-packages/instaloader/structures.py:322, in Post._obtain_metadata(self)
  20.     320 def _obtain_metadata(self):
  21.     321     if not self._full_metadata_dict:
  22. --> 322         pic_json = self._context.graphql_query(
  23.     323             '2b0673e0dc4580674a88d426fe00ea90',
  24.     324             {'shortcode': self.shortcode}
  25.     325         )
  26.     326         self._full_metadata_dict = pic_json['data']['shortcode_media']
  27.     327         if self._full_metadata_dict is None:
  28.  
  29. File ~/.pyenv/versions/3.8.13/lib/python3.8/site-packages/instaloader/instaloadercontext.py:511, in InstaloaderContext.graphql_query(self, query_hash, variables, referer)
  30.     507         tmpsession.headers['referer'] = urllib.parse.quote(referer)
  31.     509     variables_json = json.dumps(variables, separators=(',', ':'))
  32. --> 511     resp_json = self.get_json('graphql/query',
  33.     512                               params={'query_hash': query_hash,
  34.     513                                       'variables': variables_json},
  35.     514                               session=tmpsession)
  36.     515 if 'status' not in resp_json:
  37.     516     self.error("GraphQL response did not contain a \"status\" field.")
  38.  
  39. File ~/.pyenv/versions/3.8.13/lib/python3.8/site-packages/instaloader/instaloadercontext.py:450, in InstaloaderContext.get_json(self, path, params, host, session, _attempt, response_headers, use_post)
  40.     448     response_headers.update(resp.headers)
  41.     449 if resp.status_code == 400:
  42. --> 450     raise QueryReturnedBadRequestException(self._response_error(resp))
  43.     451 if resp.status_code == 404:
  44.     452     raise QueryReturnedNotFoundException(self._response_error(resp))
  45.  
  46. QueryReturnedBadRequestException: 400 Bad Request - "fail" status, message "feedback_required" when accessing https://www.instagram.com/graphql/query?query_hash=2b0673e0dc4580674a88d426fe00ea90&variables=%7B%22shortcode%22%3A%22DA5uRxXoiAm%22%7D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement