mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-13 14:37:43 +01:00
Extract the base_url for the XML download from the JS snippet's 'server' variable.
This commit is contained in:
parent
a20575e8ae
commit
8bfb6723cb
@ -33,7 +33,13 @@ def _real_extract(self, url):
|
|||||||
video_title = self._html_search_regex(
|
video_title = self._html_search_regex(
|
||||||
r'<div class="module-title">(.*?)</div>', webpage, 'title')
|
r'<div class="module-title">(.*?)</div>', webpage, 'title')
|
||||||
|
|
||||||
xml_url = 'http://video2.spiegel.de/flash/' + video_id + '.xml'
|
base_url = self._search_regex(
|
||||||
|
r'var\s+server\s+=\s+\"(http://video\d*\.spiegel\.de/flash/\d+/\d+/)\";',
|
||||||
|
webpage,
|
||||||
|
'base_url',
|
||||||
|
)
|
||||||
|
|
||||||
|
xml_url = base_url + video_id + '.xml'
|
||||||
idoc = self._download_xml(
|
idoc = self._download_xml(
|
||||||
xml_url, video_id,
|
xml_url, video_id,
|
||||||
note='Downloading XML', errnote='Failed to download XML from "{0}"'.format(xml_url))
|
note='Downloading XML', errnote='Failed to download XML from "{0}"'.format(xml_url))
|
||||||
|
Loading…
Reference in New Issue
Block a user