diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index 34ed8ca8..8a9df4dc 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -84,7 +84,8 @@ class InnerTubePokeVidious { let desc = ""; try { - const [videoInfo, videoData] = await Promise.all([ + const [invComments, videoInfo, videoData] = await Promise.all([ + fetch(`${this.config.invapi}/comments/${v}?hl=${contentlang}®ion=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text()), fetch(`${this.config.invapi}/videos/${v}?hl=${contentlang}®ion=${contentregion}&h=${btoa(Date.now())}`).then((res) => res.text()), curly .get(`${this.config.tubeApi}video?v=${v}`, { @@ -98,7 +99,7 @@ class InnerTubePokeVidious { ]); - const comments = await yt.getComments(v); + const comments = await this.getJson(invComments); const vid = await this.getJson(videoInfo); const { json, video } = videoData;