Improved MindGeek scraper session check to prevent crash when network session isn't available yet.

This commit is contained in:
DebaucheryLibrarian 2021-11-22 02:44:03 +01:00
parent c7b9ec7a4b
commit 6b4aa64d74
2 changed files with 2 additions and 1 deletions

View File

@ -321,6 +321,7 @@ export default {
}
.row {
max-width: 100%;
display: flex;
justify-content: space-between;
align-items: center;

View File

@ -234,7 +234,7 @@ async function fetchLatest(site, page = 1, options) {
const { searchParams } = new URL(url);
const siteId = searchParams.get('site');
const { session, instanceToken } = options.beforeNetwork || await getSession(site, options.parameters);
const { session, instanceToken } = options.beforeNetwork?.headers?.Instance ? options.beforeNetwork : await getSession(site, options.parameters);
const beforeDate = moment().add('1', 'day').format('YYYY-MM-DD');
const limit = 24;