Last active
April 20, 2018 13:30
-
-
Save Shrekie/9a0b715484dc696b8361b5930e263603 to your computer and use it in GitHub Desktop.
Youtube get_video_info stream URL node url_encoded_fmt_stream_map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ytdl = require('youtube-dl'); | |
var link = req.body.YTURL; | |
ytdl.exec(link, ['-f best', '-s', '-g'], {}, function(err, output) { | |
if (err) throw err; | |
res.json(output[0]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
youtube-dl has some overhead but i cant get this to work consistently without it.
Please if someone has code for node to grab the stream URL please help out, the problem is mostly the fact that some youtube videos require you to update a signature as well which is another request and the documentation on this is scarce.
You can try to dig through source code of downloaders but I'm having a hard time figuring it out.