Skip to content

Commit

Permalink
Flush client settings [#563] Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adw0rd committed Jan 29, 2022
1 parent f1aa8d6 commit f1f3175
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions instagrapi/mixins/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,14 @@ def login_by_sessionid(self, sessionid: str) -> bool:
A boolean value
"""
assert isinstance(sessionid, str) and len(sessionid) > 30, "Invalid sessionid"
self.settings = {"cookies": {"sessionid": sessionid}}
self.settings["cookies"] = {"sessionid": sessionid}
self.init()
user_id = re.search(r"^\d+", sessionid).group()

self.authorization_data = {
"ds_user_id": user_id,
"sessionid": sessionid,
"should_use_header_over_cookies": True
}

try:
user = self.user_info_v1(int(user_id))
except (PrivateError, ValidationError):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name='instagrapi',
version='1.16.13',
version='1.16.14',
author='Mikhail Andreev',
author_email='[email protected]',
license='MIT',
Expand Down

0 comments on commit f1f3175

Please sign in to comment.