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, {
|
||||
session,
|
||||
headers: {
|
||||
'Accept-Language': 'en-US,en;', // somehow seems essential for some MG sites
|
||||
},
|
||||
interval: parameters?.interval,
|
||||
concurrency: parameters?.concurrency,
|
||||
parse: false,
|
||||
|
@ -310,6 +313,7 @@ async function fetchLatest(site, page = 1, options) {
|
|||
Instance: instanceToken,
|
||||
Origin: site.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,
|
||||
Origin: site.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,
|
||||
headers: {
|
||||
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,
|
||||
headers: {
|
||||
Instance: instanceToken,
|
||||
'Accept-Language': 'en-US,en;', // somehow seems essential for some MG sites
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue