No longer Bang @id field for entryId, this is now the full URL for some reason.

This commit is contained in:
DebaucheryLibrarian
2026-03-27 03:32:26 +01:00
parent f5da798cd2
commit 01c4b61f03

View File

@@ -125,7 +125,9 @@ async function scrapeScene({ query }, { url, entity }) {
const release = {}; const release = {};
const data = query.json('//script[contains(text(), "VideoObject")]'); const data = query.json('//script[contains(text(), "VideoObject")]');
release.entryId = data?.['@id'] || decodeId(new URL(url).pathname.match(/\/video\/([\w-]+)\//)?.[1]); // @id can be URL for some reason
// release.entryId = data?.['@id'] || decodeId(new URL(url).pathname.match(/\/video\/([\w-]+)\//)?.[1]);
release.entryId = decodeId(new URL(url).pathname.match(/\/video\/([\w-]+)\//)?.[1]);
// data title is not capitalized, prefer markup // data title is not capitalized, prefer markup
release.title = query.attribute('meta[property="og:title"]', 'content') || query.content('.video-container + div h1') || data?.name; release.title = query.attribute('meta[property="og:title"]', 'content') || query.content('.video-container + div h1') || data?.name;