Added update url parameter to Dogfart scraper.

This commit is contained in:
DebaucheryLibrarian
2022-04-04 18:21:51 +02:00
parent 430c7e124d
commit 0d95746689
4 changed files with 21 additions and 12 deletions

View File

@@ -93,9 +93,8 @@ async function scrapeScene({ query }, url, channel, baseScene, parameters) {
return release;
}
async function fetchLatest(channel, page = 1) {
// const res = await qu.getAll(`https://dogfartnetwork.com/tour/scenes/?p=${page}`, '.recent-updates');
const res = await qu.getAll(`${channel.url}/tour/scenes/?p=${page}`, '.recent-updates, .preview-image-container');
async function fetchLatest(channel, page = 1, { parameters }) {
const res = await qu.getAll(parameters.latest ? `${parameters.latest}/?p=${page}` : `${channel.url}/tour/scenes/?p=${page}`, '.recent-updates, .preview-image-container');
if (res.ok) {
return scrapeLatest(res.items, channel);