mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-13 14:37:43 +01:00
[swrmediathek] Simplify
This commit is contained in:
parent
e2bf499b14
commit
0f8a01d4f3
@ -43,7 +43,7 @@ def _real_extract(self, url):
|
|||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
smilurl = 'http://swrmediathek.de/rtmpQuals/%s/clips.smil'
|
smilurl = 'http://swrmediathek.de/rtmpQuals/%s/clips.smil'
|
||||||
smildoc = self._download_xml(smilurl % video_id, video_id, note='Downloading SMIL page')
|
smildoc = self._download_xml(smilurl % video_id, video_id, 'Downloading SMIL page')
|
||||||
|
|
||||||
baseurl = smildoc.find('.//meta').attrib['base']
|
baseurl = smildoc.find('.//meta').attrib['base']
|
||||||
|
|
||||||
@ -67,8 +67,8 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': self._html_search_regex(r'<meta name="title" content="(.+)" />', webpage, 'title'),
|
'title': self._html_search_meta('title', webpage, 'title', fatal=True),
|
||||||
'thumbnail': self._search_regex(r'<link rel="image_src".+href="(.+)" />', webpage, 'thumbnail'),
|
'thumbnail': self._search_regex(r'<link rel="image_src".+href="(.+)" />', webpage, 'thumbnail'),
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'description': self._html_search_regex(r'<meta name="description" content="(.+)" />', webpage, 'description'),
|
'description': self._html_search_meta('description', webpage, 'description'),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user