浏览代码

[youtube] Fix protocol-independent URLs (Fixes #1768)

Philipp Hagemeister 11 年之前
父节点
当前提交
9f9be844fc
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      youtube_dl/extractor/youtube.py

+ 2 - 0
youtube_dl/extractor/youtube.py

@@ -1019,6 +1019,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
         """Turn the encrypted s field into a working signature"""
         """Turn the encrypted s field into a working signature"""
 
 
         if player_url is not None:
         if player_url is not None:
+            if player_url.startswith(u'//'):
+                player_url = u'https:' + player_url
             try:
             try:
                 player_id = (player_url, len(s))
                 player_id = (player_url, len(s))
                 if player_id not in self._player_cache:
                 if player_id not in self._player_cache: