From 743229525a4234c9ce4e9f8d1af0005afafd63dd Mon Sep 17 00:00:00 2001 From: Ashley //// Date: Tue, 23 Apr 2024 14:08:44 +0000 Subject: [PATCH] use invidious comments --- src/libpoketube/libpoketube-core.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;