mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 02:25:11 +00:00
[twitter] Use _download_xml
This commit is contained in:
parent
48aae2d2cf
commit
01d22d4703
1 changed files with 3 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
|||
from ..utils import (
|
||||
float_or_none,
|
||||
unescapeHTML,
|
||||
xpath_text,
|
||||
)
|
||||
|
||||
|
||||
|
@ -60,9 +61,8 @@ def _real_extract(self, url):
|
|||
video_id)
|
||||
if 'playlist' not in config:
|
||||
if 'vmapUrl' in config:
|
||||
webpage = self._download_webpage(config['vmapUrl'], video_id + ' (xml)')
|
||||
video_url = self._search_regex(
|
||||
r'<MediaFile>\s*<!\[CDATA\[(https?://.+?)\]\]>', webpage, 'data player config (xml)')
|
||||
vmap_data = self._download_xml(config['vmapUrl'], video_id)
|
||||
video_url = xpath_text(vmap_data, './/MediaFile').strip()
|
||||
f = {
|
||||
'url': video_url,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue