Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--restrict-filenames ignore "%" simbol ? #20308

Closed
tone87 opened this issue Mar 10, 2019 · 2 comments
Closed

--restrict-filenames ignore "%" simbol ? #20308

tone87 opened this issue Mar 10, 2019 · 2 comments

Comments

@tone87
Copy link

@tone87 tone87 commented Mar 10, 2019

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.03.09. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2019.03.09

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to 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 the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

# youtube-dl -v --restrict-filenames -o '%(title)s-%(id)s.%(ext)s' https://www.youtube.com/watch?v=HWISr2uDVMo
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--restrict-filenames', u'-o', u'%(title)s-%(id)s.%(ext)s', u'https://www.youtube.com/watch?v=HWISr2uDVMo']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.03.09
[debug] Python version 2.6.6 (CPython) - Linux-2.6.32-754.10.1.el6.x86_64-x86_64-with-centos-6.10-Final
[debug] exe versions: ffmpeg 2.6.8, ffprobe 2.6.8
[debug] Proxy map: {}
[youtube] HWISr2uDVMo: Downloading webpage
[youtube] HWISr2uDVMo: Downloading video info webpage
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://r8---sn-8vq54voxpu-hm2l.googlevideo.com/videoplayback?itag=299&usequic=no&requiressl=yes&pcm2cms=yes&ipbits=0&mm=31%2C26&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C298%2C299%2C302%2C303&ei=BxiFXIHCA5mu1wKdkZmwCw&fvip=3&pl=24&ms=au%2Conr&mt=1552226192&mv=m&txp=4535432&source=youtube&ip=47.53.108.103&initcwndbps=910000&c=WEB&id=o-AEGUcGVH4QET-SWe09jwymtNOobfxw6_mMcJsZKy_BLO&signature=60E19C60360ED05B75B9F1511523CEEFEFB09657.A022ED9E079FD344A66C8A462AEDB7907AB22AC8&clen=776302938&gir=yes&mn=sn-8vq54voxpu-hm2l%2Csn-1gieen7e&expire=1552247911&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpcm2cms%2Cpl%2Crequiressl%2Csource%2Cusequic%2Cexpire&mime=video%2Fmp4&key=yt6&dur=2584.983&lmt=1552140696562885&keepalive=yes&ratebypass=yes'
[download] Destination: WTF_RIOT_100%_MADE_IT_TOO_EASY_TO_GET_FED_ON_GANGPLANK_GANGPLANK_TOP_GAMEPLAY_-_League_of_Legends-HWISr2uDVMo.f299.mp4
[download] 100% of 740.34MiB in 01:59
[debug] Invoking downloader on u'https://r8---sn-8vq54voxpu-hm2l.googlevideo.com/videoplayback?itag=140&usequic=no&requiressl=yes&pcm2cms=yes&ipbits=0&mm=31%2C26&fvip=3&ei=BxiFXIHCA5mu1wKdkZmwCw&pl=24&ms=au%2Conr&mt=1552226192&mv=m&txp=4531432&source=youtube&ip=47.53.108.103&initcwndbps=910000&c=WEB&id=o-AEGUcGVH4QET-SWe09jwymtNOobfxw6_mMcJsZKy_BLO&signature=016CE3DD28AEC2F7DE2BE8D9949DB9F7B0509D96.3D4718E2B4169FBB3CD67B81ED556AC5B4D64F8C&clen=41836541&gir=yes&mn=sn-8vq54voxpu-hm2l%2Csn-1gieen7e&expire=1552247911&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpcm2cms%2Cpl%2Crequiressl%2Csource%2Cusequic%2Cexpire&mime=audio%2Fmp4&key=yt6&dur=2585.030&lmt=1552139471498845&keepalive=yes&ratebypass=yes'
[download] Destination: WTF_RIOT_100%_MADE_IT_TOO_EASY_TO_GET_FED_ON_GANGPLANK_GANGPLANK_TOP_GAMEPLAY_-_League_of_Legends-HWISr2uDVMo.f140.m4a
[download] 100% of 39.90MiB in 00:05
[ffmpeg] Merging formats into "WTF_RIOT_100%_MADE_IT_TOO_EASY_TO_GET_FED_ON_GANGPLANK_GANGPLANK_TOP_GAMEPLAY_-_League_of_Legends-HWISr2uDVMo.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:WTF_RIOT_100%_MADE_IT_TOO_EASY_TO_GET_FED_ON_GANGPLANK_GANGPLANK_TOP_GAMEPLAY_-_League_of_Legends-HWISr2uDVMo.f299.mp4' -i 'file:WTF_RIOT_100%_MADE_IT_TOO_EASY_TO_GET_FED_ON_GANGPLANK_GANGPLANK_TOP_GAMEPLAY_-_League_of_Legends-HWISr2uDVMo.f140.m4a' -c copy -map '0:v:0' -map '1:a:0' 'file:WTF_RIOT_100%_MADE_IT_TOO_EASY_TO_GET_FED_ON_GANGPLANK_GANGPLANK_TOP_GAMEPLAY_-_League_of_Legends-HWISr2uDVMo.temp.mp4'
Deleting original file WTF_RIOT_100%_MADE_IT_TOO_EASY_TO_GET_FED_ON_GANGPLANK_GANGPLANK_TOP_GAMEPLAY_-_League_of_Legends-HWISr2uDVMo.f299.mp4 (pass -k to keep)
Deleting original file WTF_RIOT_100%_MADE_IT_TOO_EASY_TO_GET_FED_ON_GANGPLANK_GANGPLANK_TOP_GAMEPLAY_-_League_of_Legends-HWISr2uDVMo.f140.m4a (pass -k to keep)
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Hi, i tried to download a file with "%(title)s-%(id)s.%(ext)s" template.
i added param : --restrict-filenames
but i have a problem with file named with "%" (percentage simbol)
for example in this case, the filename in oputput is
WTF_RIOT_100%MADE_IT_TOO_EASY_TO_GET_FED_ON_GANGPLANK_GANGPLANK_TOP_GAMEPLAY-_League_of_Legends-HWISr2uDVMo.mp4
if i download this file from http server give a 400 error because http server can't parse a percent simbol.
there's a way to suppress this simbol in output template ?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 10, 2019

No. You'll have to replace manually or fix your webserver.

@dstftw dstftw closed this Mar 10, 2019
@rautamiekka
Copy link

@rautamiekka rautamiekka commented Mar 10, 2019

if i download this file from http server give a 400 error because http server can't parse a percent simbol

You're wrong. Percent signs are the way URLs are encoded to allow for other chars, but everything you've after the percent sign in the name is a syntax violation => HTTP error 400.

Indeed, manual replacement or fix your Web Server, since youtube-dl wasn't designed for your purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.