[youku] change format_id
This commit is contained in:
parent
1498940b10
commit
08f7db20c1
1 changed files with 24 additions and 13 deletions
|
@ -148,10 +148,21 @@ class YoukuIE(InfoExtractor):
|
|||
'hd2' : 'flv',
|
||||
'hd3' : 'flv',
|
||||
'3gp' : 'flv',
|
||||
'3gphd': 'mp4',
|
||||
'3gphd' : 'mp4'
|
||||
}
|
||||
return ext_dict[fm]
|
||||
|
||||
def get_format_name(self, fm):
|
||||
_dict = {
|
||||
'3gp' : 'h6',
|
||||
'3gphd' : 'h5',
|
||||
'flv' : 'h4',
|
||||
'mp4' : 'h3',
|
||||
'hd2' : 'h2',
|
||||
'hd3' : 'h1'
|
||||
}
|
||||
return _dict[fm]
|
||||
|
||||
def _real_extract(self, url):
|
||||
mobj = re.match(self._VALID_URL, url)
|
||||
video_id = mobj.group('id')
|
||||
|
@ -191,7 +202,7 @@ class YoukuIE(InfoExtractor):
|
|||
entries[i]['formats'].append(
|
||||
{
|
||||
'url': video_urls[i],
|
||||
'format_id': fm,
|
||||
'format_id': self.get_format_name(fm),
|
||||
'ext': self.parse_ext_l(fm),
|
||||
'filesize': int(data1['segs'][fm][i]['size'])
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue