From 6a7f6f93f3a279ead0304b7f3de246b43e842c91 Mon Sep 17 00:00:00 2001 From: Ashley Date: Sun, 6 Mar 2022 23:46:29 +0300 Subject: [PATCH] Update server.js --- server.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/server.js b/server.js index 7338c29c..76159388 100644 --- a/server.js +++ b/server.js @@ -31,24 +31,7 @@ const renderTemplate = async (res, req, template, data = {}) => { }; const fetch = require("node-fetch"); const fetcher = require("./src/fetcher.js"); - app.get("/watchnew", async function (req, res) { - var url = req.query.v; - var uu = `https://www.youtube.com/watch?v=${url}`; - const json = await fetch( - `https://yt-proxy-api.herokuapp.com/get_player_info?v=${url}` - ).then((res) => res.json()); - - const lyrics = await lyricsFinder(json.title); - if (lyrics == undefined) lyrics = "Lyrics not found"; - renderTemplate(res, req, "youtubenew.ejs", { - url: json.formats[1].url, - title: json, - video: json, - date: json.upload_date, - lyrics: lyrics.replace(/\n/g, "
"), - }); -}); app.get("/watch", async function (req, res) { var url = req.query.v; var e = req.query.e;