mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	Update server.js
This commit is contained in:
		
							parent
							
								
									915acf48d5
								
							
						
					
					
						commit
						ac5bd5633a
					
				
							
								
								
									
										19
									
								
								server.js
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								server.js
									
									
									
									
									
								
							| @ -31,24 +31,6 @@ 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, " <br> "), | ||||
|   }); | ||||
| }); | ||||
| app.get("/watch", async function (req, res) { | ||||
|   var url = req.query.v; | ||||
|   var e = req.query.e; | ||||
| @ -111,7 +93,6 @@ app.get("/css/:id", (req, res) => { | ||||
| }); | ||||
| app.get("/video/upload", (req, res) => { | ||||
|            res.redirect("https://youtube.com/upload?from=poketube_utc"); | ||||
| 
 | ||||
|  }); | ||||
| app.get("*", function (req, res) { | ||||
|         renderTemplate(res, req, "404.ejs"); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley
						Ashley