No longer Bang @id field for entryId, this is now the full URL for some reason.
This commit is contained in:
@@ -125,7 +125,9 @@ async function scrapeScene({ query }, { url, entity }) {
|
||||
const release = {};
|
||||
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
|
||||
release.title = query.attribute('meta[property="og:title"]', 'content') || query.content('.video-container + div h1') || data?.name;
|
||||
|
||||
Reference in New Issue
Block a user