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.
Double underscores in the value of %(uploader_id)s are truncated #12317
Comments
|
I can confirm that this bug also affected the I guess If I get a chance I should figure out how to do a pull request to properly submit my fix for #9676... |
Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2017.02.28. 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?
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add
-vflag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):Description of your issue, suggested solution and other information
When using Output Templates, if the value of
%(uploader_id)sshould contain a double underscore, the actual behaviour is as if there is only a single underscore at that position.This can be seen in the command I gave above. It creates a directory named...
UC_Bdma6rGmzx9EBtSCQNpQbut it should be named...UC__Bdma6rGmzx9EBtSCQNpQYouTube's Channel IDs are always 24 characters long, so clearly the single underscore version is wrong. You can also demonstrate that it is wrong by trying these two URLs:
https://www.youtube.com/channel/UC_Bdma6rGmzx9EBtSCQNpQ
https://www.youtube.com/channel/UC__Bdma6rGmzx9EBtSCQNpQ
The single underscore URL gives the following error: "This channel does not exist."
Additional Info
If you use --write-info-json, the values of the
uploader_idanduploader_urlfields in the JSON file are not affected by the bug. The value of the_filenamefield is affected.It is not just directory creation that is affected by this bug. If you use a different Output Template so that the value of
%(uploader_id)sgets included in the filename, you still see the bug.YouTube's Channel IDs always start with "UC". The channel I've given as an example is UC__Bdma6rGmzx9EBtSCQNpQ - in which the double underscore comes immediately after the "UC". But the bug still happens when the double underscore is found at other positions. E.g. channel UCtk1Yv__Jcsw2NWbmZcCqsA