mirror of
https://github.com/instaloader/instaloader.git
synced 2024-08-18 12:49:38 +02:00
Update X-CSRFToken header when loading session
This commit is contained in:
parent
bd2514fcd5
commit
b0a6677c76
@ -157,6 +157,7 @@ def load_session(username, filename=None, quiet=False):
|
||||
session = requests.Session()
|
||||
session.cookies = requests.utils.cookiejar_from_dict(pickle.load(sessionfile))
|
||||
session.headers.update(default_http_header())
|
||||
session.headers.update({'X-CSRFToken':session.cookies.get_dict()['csrftoken']})
|
||||
log("Loaded session from %s." % filename, quiet=quiet)
|
||||
return session
|
||||
except FileNotFoundError:
|
||||
|
Loading…
Reference in New Issue
Block a user