Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[Question] Get youtube-dl compatible URLs from playlists #12485
Comments
|
Provide concrete example with concrete URLs of what are you trying to do. |
|
Updated. |
|
|
|
I did not realise that only an ID is sufficient for YouTube specifically. Thanks for the heads-up and sorry for the superfluous issue. |
Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2017.03.16. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Description of your issue, suggested solution and other information
I am currently making a Discord bot that will use youtube-dl to obtain music files and play them from URLs (so the usual). To make this a little easier, I wanted to run a command with youtube-dl to obtain URLs from a playlist, so I could perform individual handling on each entry in such a playlist. The problem is that, at least with YouTube playlists, the (two) URLs that are returned per video will not work if they are then supplied to youtube-dl again, presumably due to some security handling. My question is: How do I get youtube-dl compatible URLs out of a playlist using youtube-dl? Of course, I want to avoid having to manually insert the correct URL before the video ID (eg. prepending http://youtube.com/v/ to the ID) as this would bloat my code significantly and make it much more difficult to keep it up to date with new services added to youtube-dl.
For a concrete example:
I want to run something like
and then run
on the individual URLs that are returned, separately, but the URLs that are returned cannot do this (they always return errors)