mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-12 20:25:06 +01:00
set instagram specific headers
This commit is contained in:
parent
ba7137ef62
commit
9eb6700399
1 changed files with 9 additions and 0 deletions
|
@ -23,6 +23,9 @@ export default async function(obj) {
|
|||
'User-Agent': genericUserAgent,
|
||||
'X-Ig-App-Id': '936619743392459',
|
||||
'X-Asbd-Id': '129477',
|
||||
'x-ig-www-claim': cookie?._wwwClaim || '0',
|
||||
'x-csrftoken': cookie?.values()?.csrftoken,
|
||||
'x-requested-with': 'XMLHttpRequest',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
|
@ -32,6 +35,11 @@ export default async function(obj) {
|
|||
cookie
|
||||
}
|
||||
})
|
||||
|
||||
if (data.headers.get('X-Ig-Set-Www-Claim') && cookie) {
|
||||
cookie._wwwClaim = data.headers.get('X-Ig-Set-Www-Claim');
|
||||
}
|
||||
|
||||
updateCookie(cookie, data.headers);
|
||||
data = (await data.json()).data;
|
||||
} catch (e) {
|
||||
|
@ -92,3 +100,4 @@ export default async function(obj) {
|
|||
return { error: 'ErrorEmptyDownload' }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue