diff -Nru instaloader-4.10~b1+ds/debian/changelog instaloader-4.10+ds/debian/changelog --- instaloader-4.10~b1+ds/debian/changelog 2023-07-05 13:16:33.000000000 +0000 +++ instaloader-4.10+ds/debian/changelog 2023-07-15 01:17:33.000000000 +0000 @@ -1,3 +1,9 @@ +instaloader (4.10+ds-1) unstable; urgency=medium + + * New upstream version 4.10+ds + + -- Josenilson Ferreira da Silva Fri, 14 Jul 2023 22:17:33 -0300 + instaloader (4.10~b1+ds-1) unstable; urgency=medium * New upstream version 4.10~b1+ds diff -Nru instaloader-4.10~b1+ds/instaloader/__init__.py instaloader-4.10+ds/instaloader/__init__.py --- instaloader-4.10~b1+ds/instaloader/__init__.py 2023-04-19 05:58:14.000000000 +0000 +++ instaloader-4.10+ds/instaloader/__init__.py 2023-07-10 05:18:05.000000000 +0000 @@ -1,7 +1,7 @@ """Download pictures (or videos) along with their captions and other metadata from Instagram.""" -__version__ = '4.10b1' +__version__ = '4.10' try: diff -Nru instaloader-4.10~b1+ds/instaloader/instaloadercontext.py instaloader-4.10+ds/instaloader/instaloadercontext.py --- instaloader-4.10~b1+ds/instaloader/instaloadercontext.py 2023-04-19 05:58:14.000000000 +0000 +++ instaloader-4.10+ds/instaloader/instaloadercontext.py 2023-07-10 05:18:05.000000000 +0000 @@ -372,8 +372,11 @@ resp = sess.get('https://{0}/{1}'.format(host, path), params=params, allow_redirects=False) if resp.status_code in self.fatal_status_codes: redirect = " redirect to {}".format(resp.headers['location']) if 'location' in resp.headers else "" - raise AbortDownloadException("Query to https://{}/{} responded with \"{} {}\"{}".format( - host, path, resp.status_code, resp.reason, redirect + body = "" + if resp.headers['Content-Type'].startswith('application/json'): + body = ': ' + resp.text[:500] + ('…' if len(resp.text) > 501 else '') + raise AbortDownloadException("Query to https://{}/{} responded with \"{} {}\"{}{}".format( + host, path, resp.status_code, resp.reason, redirect, body )) while resp.is_redirect: redirect_url = resp.headers['location'] diff -Nru instaloader-4.10~b1+ds/instaloader/nodeiterator.py instaloader-4.10+ds/instaloader/nodeiterator.py --- instaloader-4.10~b1+ds/instaloader/nodeiterator.py 2023-04-19 05:58:14.000000000 +0000 +++ instaloader-4.10+ds/instaloader/nodeiterator.py 2023-07-10 05:18:05.000000000 +0000 @@ -137,7 +137,7 @@ if self._first_node is None: self._first_node = node return item - if self._data['page_info']['has_next_page']: + if self._data.get('page_info', {}).get('has_next_page'): query_response = self._query(self._data['page_info']['end_cursor']) if self._data['edges'] != query_response['edges'] and len(query_response['edges']) > 0: page_index, data = self._page_index, self._data @@ -289,7 +289,7 @@ is_resuming = True start_index = iterator.total_index context.log("Resuming from {}.".format(resume_file_path)) - except (InvalidArgumentException, LZMAError, json.decoder.JSONDecodeError) as exc: + except (InvalidArgumentException, LZMAError, json.decoder.JSONDecodeError, EOFError) as exc: context.error("Warning: Not resuming from {}: {}".format(resume_file_path, exc)) try: yield is_resuming, start_index diff -Nru instaloader-4.10~b1+ds/instaloader/structures.py instaloader-4.10+ds/instaloader/structures.py --- instaloader-4.10~b1+ds/instaloader/structures.py 2023-04-19 05:58:14.000000000 +0000 +++ instaloader-4.10+ds/instaloader/structures.py 2023-07-10 05:18:05.000000000 +0000 @@ -1097,6 +1097,27 @@ def _make_is_newest_checker() -> Callable[[Post, Optional[Post]], bool]: return lambda post, first: first is None or post.date_local > first.date_local + def get_followed_hashtags(self) -> NodeIterator['Hashtag']: + """ + Retrieve list of hashtags followed by given profile. + To use this, one needs to be logged in and private profiles has to be followed. + + :rtype: NodeIterator[Hashtag] + + .. versionadded:: 4.10 + """ + if not self._context.is_logged_in: + raise LoginRequiredException("--login required to get a profile's followers.") + self._obtain_metadata() + return NodeIterator( + self._context, + 'e6306cc3dbe69d6a82ef8b5f8654c50b', + lambda d: d["data"]["user"]["edge_following_hashtag"], + lambda n: Hashtag(self._context, n), + {'id': str(self.userid)}, + 'https://www.instagram.com/{0}/'.format(self.username), + ) + def get_followers(self) -> NodeIterator['Profile']: """ Retrieve list of followers of given profile. diff -Nru instaloader-4.10~b1+ds/README.rst instaloader-4.10+ds/README.rst --- instaloader-4.10~b1+ds/README.rst 2023-04-19 05:58:14.000000000 +0000 +++ instaloader-4.10+ds/README.rst 2023-07-10 05:18:05.000000000 +0000 @@ -124,6 +124,7 @@ .. current-sponsors-start | Instaloader is proudly sponsored by +| `@rocketapi-io `__ | `@socialmethod `__ See `Alex' GitHub Sponsors `__ page for