mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-01 07:57:24 +01:00
add channel about checker
This commit is contained in:
parent
53f57c6354
commit
d7bca3440a
1 changed files with 7 additions and 1 deletions
|
@ -72,6 +72,7 @@ async function video(v) {
|
||||||
if (v == null) return "Gib ID";
|
if (v == null) return "Gib ID";
|
||||||
|
|
||||||
let nightlyRes;
|
let nightlyRes;
|
||||||
|
var desc;
|
||||||
|
|
||||||
var inv_comments = await fetch(`${config.invapi}/comments/${v}`).then((res) =>
|
var inv_comments = await fetch(`${config.invapi}/comments/${v}`).then((res) =>
|
||||||
res.text()
|
res.text()
|
||||||
|
@ -97,11 +98,16 @@ async function video(v) {
|
||||||
summary_.title !== "Not found." ? summary_ : "none"
|
summary_.title !== "Not found." ? summary_ : "none"
|
||||||
);
|
);
|
||||||
|
|
||||||
const desc = a.Channel?.Contents.ItemSection.About.Description;
|
if (a.Channel?.Contents.ItemSection.About) {
|
||||||
|
desc = a.Channel?.Contents.ItemSection.About.Description;
|
||||||
|
} else {
|
||||||
|
desc = "No about section";
|
||||||
|
}
|
||||||
|
|
||||||
const data = await fetcher(v);
|
const data = await fetcher(v);
|
||||||
|
|
||||||
const nightlyJsonData = getJson(nightlyRes);
|
const nightlyJsonData = getJson(nightlyRes);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
json: data.video.Player,
|
json: data.video.Player,
|
||||||
video: await fetch(`${config.tubeApi}video?v=${v}`)
|
video: await fetch(`${config.tubeApi}video?v=${v}`)
|
||||||
|
|
Loading…
Reference in a new issue