chore(extractor): cache YouTube for 6h

This commit is contained in:
WebStreamr 2025-09-02 15:06:55 +00:00
parent 41aacf84db
commit 833043143f
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,8 @@ export class YouTube extends Extractor {
public readonly label = 'YouTube';
public override readonly ttl: number = 21600000; // 6h
public supports(_ctx: Context, url: URL): boolean {
return null !== url.host.match(/youtube/) && url.searchParams.has('v');
}

View file

@ -12,7 +12,7 @@ exports[`YouTube Solaris 1`] = `
"title": "Solaris | SCIENCE FICTION | FULL MOVIE | directed by Tarkovsky",
},
"sourceId": "youtube_en",
"ttl": 900000,
"ttl": 21600000,
"url": "https://www.youtube.com/watch?v=Z8ZhQPaw4rE",
"ytId": "Z8ZhQPaw4rE",
},