Skip to content

Commit

Permalink
Call inject_sessionid_to_public for ClientLoginRequired
Browse files Browse the repository at this point in the history
  • Loading branch information
adw0rd committed Aug 16, 2023
1 parent a50fbda commit f1fd00f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions instagrapi/mixins/hashtag.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import List, Tuple

from instagrapi.utils import dumps
from instagrapi.exceptions import ClientUnauthorizedError
from instagrapi.exceptions import ClientUnauthorizedError, ClientLoginRequired
from instagrapi.exceptions import ClientError, HashtagNotFound, WrongCursorError
from instagrapi.extractors import (
extract_hashtag_gql,
Expand Down Expand Up @@ -172,7 +172,7 @@ def hashtag_medias_a1_chunk(
params = {"max_id": end_cursor} if end_cursor else {}
try:
data = self.public_a1_request(url, params=params)
except ClientUnauthorizedError:
except (ClientUnauthorizedError, ClientLoginRequired):
self.inject_sessionid_to_public()
data = self.public_a1_request(url, params=params)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

setup(
name="instagrapi",
version="1.19.6",
version="1.19.7",
author="Mikhail Andreev",
author_email="[email protected]",
license="MIT",
Expand Down

0 comments on commit f1fd00f

Please sign in to comment.