From 7ae2376e00680a4eb244b6ed0c8b3a45d828bdd3 Mon Sep 17 00:00:00 2001 From: Ashley <65588168+ashpotter@users.noreply.github.com> Date: Sun, 11 Jul 2021 19:15:06 +0300 Subject: [PATCH] Update server.js --- server.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index 4bb4c318..8c60378b 100644 --- a/server.js +++ b/server.js @@ -1,7 +1,5 @@ const path = require("path"); - const templateDir = path.resolve(`${process.cwd()}${path.sep}html`); - var express = require("express"); var app = express(); app.engine("html", require("ejs").renderFile); @@ -16,7 +14,7 @@ const renderTemplate = async (res, req, template, data = {}) => { app.get("/watch", function(req, res) { var url = req.query.v; - var jth = `https://www.youtube.com/watch?v=${url}`; + var uu = `https://www.youtube.com/watch?v=${url}`; var search = require("youtube-search"); var opts = { @@ -25,7 +23,7 @@ app.get("/watch", function(req, res) { }; const fetch = require("node-fetch"); - search(jth, opts, function(err, results) { + search(uu, opts, function(err, results) { var i = results[0].id; fetch(`https://poketalebot.com/api/ytdl/dowlands/fromurl/get/json?url=${i}`) .then(res => res.json())