mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-14 15:22:35 +00:00
[twitter:card] Remove unneeded 'ext'
This commit is contained in:
parent
014e880372
commit
f322bfb063
1 changed files with 2 additions and 6 deletions
|
@ -64,13 +64,9 @@ class TwitterCardIE(InfoExtractor):
|
||||||
if 'vmapUrl' in config:
|
if 'vmapUrl' in config:
|
||||||
vmap_data = self._download_xml(config['vmapUrl'], video_id)
|
vmap_data = self._download_xml(config['vmapUrl'], video_id)
|
||||||
video_url = xpath_text(vmap_data, './/MediaFile').strip()
|
video_url = xpath_text(vmap_data, './/MediaFile').strip()
|
||||||
f = {
|
formats.append({
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
}
|
})
|
||||||
ext = re.search(r'\.([a-z0-9]{2,4})(\?.+)?$', video_url)
|
|
||||||
if ext:
|
|
||||||
f['ext'] = ext.group(1)
|
|
||||||
formats.append(f)
|
|
||||||
break # same video regardless of UA
|
break # same video regardless of UA
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue