mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 14:57:52 +01:00
use innertube objects instead
This commit is contained in:
parent
d74397ebec
commit
7d71b156ff
1 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
const {
|
const {
|
||||||
fetcher,
|
fetcher,
|
||||||
core,
|
INNERTUBE,
|
||||||
wiki,
|
wiki,
|
||||||
musicInfo,
|
musicInfo,
|
||||||
modules,
|
modules,
|
||||||
|
@ -192,7 +192,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
var contentlang = hl || "en-US";
|
var contentlang = hl || "en-US";
|
||||||
var contentregion = region || "US";
|
var contentregion = region || "US";
|
||||||
|
|
||||||
const isVideoValid = await core.isvalidvideo(v);
|
const isVideoValid = await INNERTUBE.isvalidvideo(v);
|
||||||
if (!isVideoValid) {
|
if (!isVideoValid) {
|
||||||
return res.redirect("/?fromerror=21_video_not_valid");
|
return res.redirect("/?fromerror=21_video_not_valid");
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
const secure = ["poketube.fun"].includes(req.hostname);
|
const secure = ["poketube.fun"].includes(req.hostname);
|
||||||
const verify = req.hostname === "poketube.sudovanilla.com";
|
const verify = req.hostname === "poketube.sudovanilla.com";
|
||||||
|
|
||||||
core.video(v, contentlang, contentregion).then((data) => {
|
INNERTUBE.getYouTubeApiVideo(v, contentlang, contentregion).then((data) => {
|
||||||
try {
|
try {
|
||||||
const k = data?.video;
|
const k = data?.video;
|
||||||
const channel_uploads = data?.channel_uploads
|
const channel_uploads = data?.channel_uploads
|
||||||
|
@ -357,9 +357,9 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
engagement,
|
engagement,
|
||||||
comments: inv_comments,
|
comments: inv_comments,
|
||||||
vid: inv_vid,
|
vid: inv_vid,
|
||||||
} = await core.video(v);
|
} = await INNERTUBE.getYouTubeApiVideo(v);
|
||||||
|
|
||||||
const data = await core.video(v);
|
const data = await INNERTUBE.getYouTubeApiVideo(v);
|
||||||
const color = data.color;
|
const color = data.color;
|
||||||
const color2 = data.color2;
|
const color2 = data.color2;
|
||||||
const desc = data?.desc;
|
const desc = data?.desc;
|
||||||
|
|
Loading…
Reference in a new issue