Added Accept-Language header to MindGeek requests, seems to help with acquiring sessions.
This commit is contained in:
parent
3ec6911d46
commit
61123fdb6a
|
@ -222,6 +222,9 @@ async function getSession(site, parameters, url) {
|
||||||
|
|
||||||
const res = await http.get(sessionUrl, {
|
const res = await http.get(sessionUrl, {
|
||||||
session,
|
session,
|
||||||
|
headers: {
|
||||||
|
'Accept-Language': 'en-US,en;', // somehow seems essential for some MG sites
|
||||||
|
},
|
||||||
interval: parameters?.interval,
|
interval: parameters?.interval,
|
||||||
concurrency: parameters?.concurrency,
|
concurrency: parameters?.concurrency,
|
||||||
parse: false,
|
parse: false,
|
||||||
|
@ -310,6 +313,7 @@ async function fetchLatest(site, page = 1, options) {
|
||||||
Instance: instanceToken,
|
Instance: instanceToken,
|
||||||
Origin: site.url,
|
Origin: site.url,
|
||||||
Referer: url,
|
Referer: url,
|
||||||
|
'Accept-Language': 'en-US,en;', // somehow seems essential for some MG sites
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -334,6 +338,7 @@ async function fetchUpcoming(site, page, options) {
|
||||||
Instance: instanceToken,
|
Instance: instanceToken,
|
||||||
Origin: site.url,
|
Origin: site.url,
|
||||||
Referer: url,
|
Referer: url,
|
||||||
|
'Accept-Language': 'en-US,en;', // somehow seems essential for some MG sites
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -359,6 +364,7 @@ async function fetchRelease(url, site, baseScene, options) {
|
||||||
concurrency: options.parameters.concurrency,
|
concurrency: options.parameters.concurrency,
|
||||||
headers: {
|
headers: {
|
||||||
Instance: instanceToken,
|
Instance: instanceToken,
|
||||||
|
'Accept-Language': 'en-US,en;', // somehow seems essential for some MG sites
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -381,6 +387,7 @@ async function fetchProfile({ name: actorName, slug: actorSlug }, { entity, para
|
||||||
concurrency: parameters.concurrency,
|
concurrency: parameters.concurrency,
|
||||||
headers: {
|
headers: {
|
||||||
Instance: instanceToken,
|
Instance: instanceToken,
|
||||||
|
'Accept-Language': 'en-US,en;', // somehow seems essential for some MG sites
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue