chore(extractor): cache YouTube for 6h
This commit is contained in:
parent
41aacf84db
commit
833043143f
2 changed files with 3 additions and 1 deletions
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue