mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 13:28:28 +01:00
Update server.js
This commit is contained in:
parent
3125ccacf2
commit
fef5b95f61
1 changed files with 5 additions and 8 deletions
13
server.js
13
server.js
|
@ -45,18 +45,15 @@ const fetcher = require("./src/fetcher.js");
|
||||||
app.get("/watch", async function (req, res) {
|
app.get("/watch", async function (req, res) {
|
||||||
var v = req.query.v;
|
var v = req.query.v;
|
||||||
var e = req.query.e;
|
var e = req.query.e;
|
||||||
var fetching = await fetcher(v)
|
if(!v) res.redirect("/")
|
||||||
const url = fetching.video.Player.Formats.Format[1].URL
|
var fetching = await fetcher(v)
|
||||||
/*
|
|
||||||
const j = fetching.video.Player.Formats.Format,
|
const j = fetching.video.Player.Formats.Format,
|
||||||
j_ = typeof j === 'object' && j !== null
|
j_ = Array.isArray(j)
|
||||||
? j
|
? j[j.length - 1]
|
||||||
: j[j.length - 1];
|
: j;
|
||||||
let url;
|
let url;
|
||||||
|
|
||||||
if (j_.URL != undefined)
|
if (j_.URL != undefined)
|
||||||
url = j_.URL;
|
url = j_.URL;
|
||||||
*/
|
|
||||||
const json = fetching.video.Player
|
const json = fetching.video.Player
|
||||||
const engagement = fetching.engagement
|
const engagement = fetching.engagement
|
||||||
const lyrics = await lyricsFinder(json.Title);
|
const lyrics = await lyricsFinder(json.Title);
|
||||||
|
|
Loading…
Reference in a new issue