diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-09-06 18:39:35 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-09-06 18:39:35 +0200 |
commit | a7130543fa0368175740f5fa173ef920671db866 (patch) | |
tree | 2fb4a1ceb4998071335c969ce76bb117ab7ba937 /youtube_dl | |
parent | a490fda7464a3cb9d7b5938305241740bae69efb (diff) |
[generic] If the url doesn't specify the protocol, then try to extract prepending 'http://'
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/generic.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index de7379a92..f92e61fea 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -109,6 +109,11 @@ class GenericIE(InfoExtractor): return new_url def _real_extract(self, url): + parsed_url = compat_urlparse.urlparse(url) + if not parsed_url.scheme: + self._downloader.report_warning('The url doesn\'t specify the protocol, trying with http') + return self.url_result('http://' + url) + try: new_url = self._test_redirect(url) if new_url: |