mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 23:37:48 +01:00
comments :3
This commit is contained in:
parent
b044cf12ce
commit
1504e70737
1 changed files with 11 additions and 4 deletions
|
@ -81,11 +81,17 @@ async function video(v) {
|
||||||
.then((res) => res.text())
|
.then((res) => res.text())
|
||||||
.then((xml) => JSON.parse(toJson(xml)));
|
.then((xml) => JSON.parse(toJson(xml)));
|
||||||
|
|
||||||
var i = await fetch(`${config.invapi}/comments/${v}`).then((res) =>
|
var inv_comments = await fetch(`${config.invapi}/comments/${v}`).then((res) =>
|
||||||
res.text()
|
res.text()
|
||||||
);
|
);
|
||||||
|
|
||||||
var inv = await JSON.parse(i);
|
var comments = await JSON.parse(inv_comments);
|
||||||
|
|
||||||
|
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then((res) =>
|
||||||
|
res.text()
|
||||||
|
);
|
||||||
|
|
||||||
|
var vid = await JSON.parse(video_new_info);
|
||||||
|
|
||||||
const c = await channel(video.Video.Channel.id);
|
const c = await channel(video.Video.Channel.id);
|
||||||
|
|
||||||
|
@ -100,7 +106,8 @@ async function video(v) {
|
||||||
return {
|
return {
|
||||||
json: data.video.Player,
|
json: data.video.Player,
|
||||||
video,
|
video,
|
||||||
inv,
|
vid,
|
||||||
|
comments,
|
||||||
engagement: data.engagement,
|
engagement: data.engagement,
|
||||||
wiki: summary,
|
wiki: summary,
|
||||||
desc: c.about.Channel.Contents.ItemSection.About.Description,
|
desc: c.about.Channel.Contents.ItemSection.About.Description,
|
||||||
|
@ -134,4 +141,4 @@ module.exports = {
|
||||||
search,
|
search,
|
||||||
video,
|
video,
|
||||||
channel,
|
channel,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue