aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-05-13 09:42:38 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-05-13 09:42:38 +0200
commit57c7411f4615cda595f06fa461719b4336d808f4 (patch)
tree900d34b7d2e237b490fd517ed7ea29d897d5f942 /youtube_dl/extractor/common.py
parentd0a122348e56c68dad1f34d67103ab3a353f602a (diff)
downloadyoutube-dl-57c7411f4615cda595f06fa461719b4336d808f4.tar.xz
[mixcloud] Shed API dependency (#2904)
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index cef8c523c..11b31db88 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -556,6 +556,16 @@ class InfoExtractor(object):
if self._downloader.params.get('prefer_insecure', False)
else 'https:')
+ def _proto_relative_url(self, url, scheme=None):
+ if url is None:
+ return url
+ if url.startswith('//'):
+ if scheme is None:
+ scheme = self.http_scheme()
+ return scheme + url
+ else:
+ return url
+
class SearchInfoExtractor(InfoExtractor):
"""