Preventing unnecessary deep scrapes in Team Skeet scraper.

This commit is contained in:
DebaucheryLibrarian 2022-02-13 01:34:39 +01:00
parent df4d860d35
commit 5918364cf5
1 changed files with 5 additions and 0 deletions

View File

@ -129,6 +129,11 @@ async function fetchLatest(channel, page = 1, { parameters }) {
}
async function fetchScene(url, channel, baseScene, { parameters }) {
if (baseScene?.entryId) {
// overview and deep data is the same, don't hit server unnecessarily
return baseScene;
}
const sceneSlug = new URL(url).pathname.match(/\/([\w-]+$)/)[1];
const res = await http.get(`${parameters.videos}/${sceneSlug}`);