1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-11-04 09:22:29 +01:00

Fix rhx_gis calculation to fix 403 (fix #94)

This commit is contained in:
Alexander Graf 2018-04-13 18:04:39 +02:00
parent ced65ea401
commit efa0b93fda

View File

@ -725,7 +725,7 @@ class Instaloader:
variables_json = json.dumps(variables, separators=(',', ':'))
if rhx_gis:
values = "{}:{}:{}:{}".format(rhx_gis, tmpsession.cookies['csrftoken'], self.user_agent, variables_json)
values = "{}:{}:{}".format(rhx_gis, tmpsession.cookies['csrftoken'], variables_json)
x_instagram_gis = hashlib.md5(values.encode()).hexdigest()
tmpsession.cookies.set('ig_pr', '2')
tmpsession.headers['x-instagram-gis'] = x_instagram_gis