test ignore

This commit is contained in:
Ashley //// 2024-04-24 15:44:33 +00:00
parent 61fb7ee345
commit a68fcde7f9

View file

@ -96,10 +96,8 @@ class InnerTubePokeVidious {
}),
]);
const comments = await this.getJson(invComments);
const vid = await this.getJson(videoInfo);
let vid = await this.getJson(videoInfo);
const { json, video } = videoData;
var channel_uploads = {};
@ -110,6 +108,15 @@ class InnerTubePokeVidious {
var p = this.getJson(await channel_uploads.text());
}
// Retry fetching videoInfo if vid is null, limited to 3 retries
let retryCount = 0;
while (!vid && retryCount < 3) {
console.log(`Retrying fetching videoInfo... Retry ${retryCount + 1}`);
const retryVideoInfo = await fetch(`${this.config.invapi}/videos/${v}?hl=${contentlang}&region=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text());
vid = await this.getJson(retryVideoInfo);
retryCount++;
}
if (!vid) {
console.log(
`Sorry nya, we couldn't find any information about that video qwq`