mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 09:18:27 +01:00
mhm
This commit is contained in:
parent
35e06ef2e8
commit
49c03bf3c0
1 changed files with 70 additions and 69 deletions
|
@ -67,7 +67,7 @@ class InnerTubePokeVidious {
|
|||
* @param {string} v - Video ID.
|
||||
* @returns {Promise<object>} Promise resolving to the video information.
|
||||
*/
|
||||
async getYouTubeApiVideo(f, v, contentlang, contentregion) {
|
||||
async getYouTubeApiVideo(f, v, contentlang, contentregion) {
|
||||
|
||||
const { fetch } = await import("undici");
|
||||
|
||||
|
@ -96,11 +96,13 @@ async getYouTubeApiVideo(f, v, contentlang, contentregion) {
|
|||
}),
|
||||
]);
|
||||
|
||||
|
||||
const comments = await this.getJson(invComments);
|
||||
let vid = await this.getJson(videoInfo);
|
||||
|
||||
const vid = await this.getJson(videoInfo);
|
||||
const { json, video } = videoData;
|
||||
|
||||
var channel_uploads = {};
|
||||
var channel_uploads = { };
|
||||
if (f == "true") {
|
||||
channel_uploads = await fetch(
|
||||
`${this.config.invapi}/channels/${vid.authorId}?hl=${contentlang}®ion=${contentregion}`
|
||||
|
@ -108,7 +110,6 @@ async getYouTubeApiVideo(f, v, contentlang, contentregion) {
|
|||
var p = this.getJson(await channel_uploads.text());
|
||||
}
|
||||
|
||||
|
||||
if (!vid) {
|
||||
console.log(
|
||||
`Sorry nya, we couldn't find any information about that video qwq`
|
||||
|
@ -150,7 +151,7 @@ async getYouTubeApiVideo(f, v, contentlang, contentregion) {
|
|||
} catch {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue