aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youku.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/extractor/youku.py')
-rw-r--r--youtube_dl/extractor/youku.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youku.py b/youtube_dl/extractor/youku.py
index e081cfc19..ab97466d2 100644
--- a/youtube_dl/extractor/youku.py
+++ b/youtube_dl/extractor/youku.py
@@ -22,7 +22,9 @@ class YoukuIE(InfoExtractor):
IE_DESC = '优酷'
_VALID_URL = r'''(?x)
(?:
- http://(?:v|player)\.youku\.com/(?:v_show/id_|player\.php/sid/)|
+ https?://(
+ (?:v|player)\.youku\.com/(?:v_show/id_|player\.php/sid/)|
+ video\.tudou\.com/v/)|
youku:)
(?P<id>[A-Za-z0-9]+)(?:\.html|/v\.swf|)
'''
@@ -71,6 +73,16 @@ class YoukuIE(InfoExtractor):
'ext': 'mp4',
'title': '我的世界☆明月庄主☆车震猎杀☆杀人艺术Minecraft',
},
+ }, {
+ 'url': 'http://video.tudou.com/v/XMjIyNzAzMTQ4NA==.html?f=46177805',
+ 'info_dict': {
+ 'id': 'XMjIyNzAzMTQ4NA',
+ 'ext': 'mp4',
+ 'title': '卡马乔国足开大脚长传冲吊集锦',
+ },
+ }, {
+ 'url': 'http://video.tudou.com/v/XMjE4ODI3OTg2MA==.html',
+ 'only_matching': True,
}]
@staticmethod
@@ -107,7 +119,7 @@ class YoukuIE(InfoExtractor):
# request basic data
basic_data_params = {
'vid': video_id,
- 'ccode': '0401',
+ 'ccode': '0402' if 'tudou.com' in url else '0401',
'client_ip': '192.168.1.1',
'utid': cna,
'client_ts': time.time() / 1000,