Disabled MindGeek session bundling to analyze Too Many Requests errors.
This commit is contained in:
parent
4c503a3177
commit
372db86927
|
@ -179,8 +179,6 @@ async function getSession(site, parameters) {
|
||||||
const cookieString = await cookieJar.getCookieStringAsync(sessionUrl);
|
const cookieString = await cookieJar.getCookieStringAsync(sessionUrl);
|
||||||
const { instance_token: instanceToken } = cookie.parse(cookieString);
|
const { instance_token: instanceToken } = cookie.parse(cookieString);
|
||||||
|
|
||||||
console.log(site.name, instanceToken);
|
|
||||||
|
|
||||||
return { session, instanceToken };
|
return { session, instanceToken };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,9 +238,8 @@ async function fetchLatest(site, page = 1, options) {
|
||||||
const { searchParams } = new URL(url);
|
const { searchParams } = new URL(url);
|
||||||
const siteId = searchParams.get('site');
|
const siteId = searchParams.get('site');
|
||||||
|
|
||||||
const { session, instanceToken } = options.beforeNetwork?.headers?.Instance ? options.beforeNetwork : await getSession(site, options.parameters);
|
// const { session, instanceToken } = options.beforeNetwork?.headers?.Instance ? options.beforeNetwork : await getSession(site, options.parameters);
|
||||||
|
const { session, instanceToken } = await getSession(site, options.parameters);
|
||||||
console.log('fetch', instanceToken);
|
|
||||||
|
|
||||||
const beforeDate = moment().add('1', 'day').format('YYYY-MM-DD');
|
const beforeDate = moment().add('1', 'day').format('YYYY-MM-DD');
|
||||||
const limit = 24;
|
const limit = 24;
|
||||||
|
@ -368,7 +365,7 @@ async function fetchProfile({ name: actorName, slug: actorSlug }, { entity, para
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
beforeNetwork: getSession,
|
// beforeNetwork: getSession,
|
||||||
beforeFetchScenes: getSession,
|
beforeFetchScenes: getSession,
|
||||||
scrapeLatestX,
|
scrapeLatestX,
|
||||||
fetchLatest,
|
fetchLatest,
|
||||||
|
|
Loading…
Reference in New Issue