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

Cant use curl with video titles having special characters #22855

Closed
Witchilich opened this issue Oct 26, 2019 · 3 comments
Closed

Cant use curl with video titles having special characters #22855

Witchilich opened this issue Oct 26, 2019 · 3 comments

Comments

@Witchilich
Copy link

@Witchilich Witchilich commented Oct 26, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.10.22
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: ['-f', 'bestvideo[height>2160]+bestaudio[acodec=opus]/(bestvideo[height=2160][fps>30]+251)/bestvideo[height=2160]+251/bestvideo[height=2160]+140/(bestvideo[height=1440][fps>30]+251)/bestvideo[height=1440]+251/bestvideo[height=1440]+140/(bestvideo[height=1080][fps>30]+251)/bestvideo[height=1080]+251/bestvideo[height=1080]+140/(bestvideo[height=720][fps>30]+251)/bestvideo+251/bestvideo+bestaudio/best', '--write-sub', '--sub-lang', 'en,en-US,en-CA,en-GB', '--convert-subs', 'ass', '--merge-output-format', 'mkv', '-o', '%(title)s']
[debug] Custom config: []
[debug] Command-line args: ['-v', '-f', '244+250', '--external-downloader', 'curl', 'https://www.youtube.com/watch?v=3BpnB47Fxts']
[debug] Encodings: locale cp932, fs mbcs, out cp932, pref cp932
[debug] youtube-dl version 2019.09.28
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg N-94953-gef50cf7b32
[debug] Proxy map: {}

The complete verbose log with curl is too big, so here is the end part

100 19.5M  100 19.5M    0     0  81226      0  0:04:12  0:04:12 --:--:--  122k
* Connection #1 to host r4---sn-cvh76nes.googlevideo.com left intact
ERROR: unable to download video data: [WinError 2] The system cannot find the file specified: '[MV] FIESTAR(피에스타) _ APPLE PIE(애플파이).f244.part'
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpyi91grvc\build\youtube_dl\YoutubeDL.py", line 1919, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpyi91grvc\build\youtube_dl\YoutubeDL.py", line 1864, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpyi91grvc\build\youtube_dl\downloader\common.py", line 366, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpyi91grvc\build\youtube_dl\downloader\external.py", line 52, in real_download
  File "C:\Python\Python34\lib\genericpath.py", line 50, in getsize
FileNotFoundError: [WinError 2] The system cannot find the file specified: '[MV] FIESTAR(피에스타) _ APPLE PIE(애플파이).f244.part'

Description

It seems like youtube-dl is unable to pass the filename with special characters to curl, but it has no problems doing it on its own without an external download manager. In this case the file '[MV] FIESTAR(피에스타) _ APPLE PIE(애플파이).f244.part' actually has been downloaded and renamed as '[MV] FIESTAR() _ APPLE PIE().f244.part' instead(so youtube-dl thinks the file does not exist). The subtitles downloaded by youtube-dl on its own has been properly named '[MV] FIESTAR(피에스타) _ APPLE PIE(애플파이).en.vtt'. Is there no work around for this ?

@Witchilich
Copy link
Author

@Witchilich Witchilich commented Oct 26, 2019

And Github formatted the filename. Its actually this
image

@Witchilich Witchilich changed the title Cant use curl with videos titles havin Cant use curl with videos titles having special characters Oct 26, 2019
@Witchilich Witchilich changed the title Cant use curl with videos titles having special characters Cant use curl with video titles having special characters Oct 26, 2019
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 26, 2019

> py -3.7 .\youtube_dl\__main__.py https://www.youtube.com/watch?v=3BpnB47Fxts --external-downloader curl
[youtube] 3BpnB47Fxts: Downloading webpage
[youtube] 3BpnB47Fxts: Downloading video info webpage
[youtube] 3BpnB47Fxts: Downloading js player vflsEMaQv
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: [MV] FIESTAR(피에스타) _ APPLE PIE(애플파이)-3BpnB47Fxts.f137.mp4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 13 85.0M   13 11.1M    0     0  4130k      0  0:00:21  0:00:02  0:00:19 5353k
ERROR: Interrupted by user
@dstftw dstftw closed this Oct 26, 2019
@Witchilich
Copy link
Author

@Witchilich Witchilich commented Oct 26, 2019

@dstftw
Ofcourse, you cant reproduce it, since you interrupted the download. Try completing it.

 youtube-dl -f 244+250 --external-downloader curl https://www.youtube.com/watch?v=3BpnB47Fxts
[youtube] 3BpnB47Fxts: Downloading webpage
[youtube] 3BpnB47Fxts: Downloading video info webpage
WARNING: en-US subtitles not available for 3BpnB47Fxts
WARNING: en-CA subtitles not available for 3BpnB47Fxts
WARNING: en-GB subtitles not available for 3BpnB47Fxts
[info] Writing video subtitles to: [MV] FIESTAR(피에스타) _ APPLE PIE(애플파이).en.vtt
[download] Destination: [MV] FIESTAR(피에스타) _ APPLE PIE(애플파이).f244
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19.5M  100 19.5M    0     0   166k      0  0:02:00  0:02:00 --:--:--  195k
ERROR: unable to download video data: [WinError 2] The system cannot find the file specified: '[MV] FIESTAR(피에스타) _ APPLE PIE(애플파이).f244.part'

It renames it as mentioned in my previous comment and after downloading the whole track it says the system cannot find the file specified.
Try finding the part file you interrupted download for, you will see it has been renamed.

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
2 participants
You can’t perform that action at this time.