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

Handle protocol-relative URLs #6490

Closed
masklinn opened this issue Aug 7, 2015 · 0 comments
Closed

Handle protocol-relative URLs #6490

masklinn opened this issue Aug 7, 2015 · 0 comments

Comments

@masklinn
Copy link

@masklinn masklinn commented Aug 7, 2015

Trying to download http://www.funnyordie.com/videos/ea20db28f8/kristen-stewart-jesse-eisenberg-interview-each-other (warning: autostarting video) fails with:

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.funnyordie.com/videos/ea20db28f8/kristen-stewart-jesse-eisenberg-interview-each-other']
[debug] Encodings: locale utf-8, fs utf-8, out utf-8, pref utf-8
[debug] youtube-dl version 2015.07.28
[debug] Python version 2.7.10 - Darwin-13.4.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.7.2, ffprobe 2.7.2, rtmpdump 2.4
[debug] Proxy map: {}
[FunnyOrDie] ea20db28f8: Downloading webpage
[debug] Invoking downloader on u'//vo.fod4.com/v/ea20db28f8/v2500.mp4'
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/opt/local/bin/youtube-dl/youtube_dl/__init__.py", line 410, in main
  File "/opt/local/bin/youtube-dl/youtube_dl/__init__.py", line 400, in _real_main
  File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1504, in download
  File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 667, in extract_info
  File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 713, in process_ie_result
  File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1174, in process_video_result
  File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1436, in process_info
  File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1378, in dl
  File "/opt/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 342, in download
  File "/opt/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 59, in real_download
  File "/opt/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1732, in urlopen
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 423, in open
    protocol = req.get_type()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 285, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: //vo.fod4.com/v/ea20db28f8/v2500.mp4

Plugging the url into wget (with a scheme) correctly downloads the video so youtube-dl finds it just fine, it just needs to resolve the protocol-relative URL by re-using the protocol of the source page.

@dstftw dstftw closed this in 1df3186 Aug 12, 2015
dstftw added a commit that referenced this issue Aug 12, 2015
[funnyordie] Handle protocol-relative URLs (fixes #6490)
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
1 participant
You can’t perform that action at this time.