1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 03:02:50 +01:00

[instagram] Fix extraction after `rhx_gis' field removal

This commit is contained in:
Leonardo Taccari 2019-05-17 17:48:03 +02:00 committed by Mike Fährmann
parent 7a14aaed7d
commit fb09dd962a

View File

@ -120,8 +120,7 @@ class InstagramExtractor(Extractor):
if 'entry_data' in shared_data: if 'entry_data' in shared_data:
base_shared_data = shared_data['entry_data'][page_type][0]['graphql'] base_shared_data = shared_data['entry_data'][page_type][0]['graphql']
# `rhx_gis' and variables_id are available only in the first page # variables_id is available only in the first page
rhx_gis = shared_data['rhx_gis']
variables_id = base_shared_data[psdf['node']][psdf['node_id']] variables_id = base_shared_data[psdf['node']][psdf['node_id']]
else: else:
base_shared_data = shared_data['data'] base_shared_data = shared_data['data']
@ -143,10 +142,9 @@ class InstagramExtractor(Extractor):
variables_id, variables_id,
end_cursor, end_cursor,
) )
xigis = '{}:{}'.format(rhx_gis, variables)
headers = { headers = {
"X-Requested-With": "XMLHttpRequest", "X-Requested-With": "XMLHttpRequest",
"X-Instagram-GIS": hashlib.md5(xigis.encode()).hexdigest(), "X-Instagram-GIS": hashlib.md5(variables.encode()).hexdigest(),
} }
url = '{}/graphql/query/?query_hash={}&variables={}'.format( url = '{}/graphql/query/?query_hash={}&variables={}'.format(
self.root, self.root,