1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-23 02:32:16 +00:00

[youku] Reorder format items

This commit is contained in:
Yen Chi Hsuan 2015-12-12 15:24:58 +08:00
parent ade2340971
commit dbb7d7e26c

View file

@ -143,30 +143,30 @@ class YoukuIE(InfoExtractor):
def get_hd(self, fm): def get_hd(self, fm):
hd_id_dict = { hd_id_dict = {
'flv': '0',
'mp4': '1',
'hd2': '2',
'hd3': '3',
'3gp': '0', '3gp': '0',
'3gphd': '1', '3gphd': '1',
'flv': '0',
'flvhd': '0', 'flvhd': '0',
'mp4': '1',
'mp4hd': '1', 'mp4hd': '1',
'mp4hd2': '1' 'mp4hd2': '1',
'hd2': '2',
'hd3': '3',
} }
return hd_id_dict[fm] return hd_id_dict[fm]
def parse_ext_l(self, fm): def parse_ext_l(self, fm):
ext_dict = { ext_dict = {
'3gp': 'flv',
'3gphd': 'mp4',
'flv': 'flv', 'flv': 'flv',
'flvhd': 'flv',
'mp4': 'mp4', 'mp4': 'mp4',
'mp4hd': 'mp4', 'mp4hd': 'mp4',
'mp4hd2': 'flv', 'mp4hd2': 'flv',
'mp4hd3': 'flv', 'mp4hd3': 'flv',
'hd2': 'flv', 'hd2': 'flv',
'hd3': 'flv', 'hd3': 'flv',
'3gp': 'flv',
'3gphd': 'mp4',
'flvhd': 'flv'
} }
return ext_dict[fm] return ext_dict[fm]
@ -174,14 +174,14 @@ class YoukuIE(InfoExtractor):
_dict = { _dict = {
'3gp': 'h6', '3gp': 'h6',
'3gphd': 'h5', '3gphd': 'h5',
'flvhd': 'h4',
'flv': 'h4', 'flv': 'h4',
'flvhd': 'h4',
'mp4': 'h3', 'mp4': 'h3',
'mp4hd': 'h3',
'mp4hd2': 'h4',
'mp4hd3': 'h4',
'hd2': 'h2', 'hd2': 'h2',
'hd3': 'h1', 'hd3': 'h1',
'mp4hd': 'h3',
'mp4hd3': 'h4',
'mp4hd2': 'h4'
} }
return _dict[fm] return _dict[fm]