1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-09 14:12:51 +08:00

[sevenplus] add series title extraction

This commit is contained in:
Kay B 2018-03-17 21:45:58 +01:00
parent 4b5691179c
commit 4db05564b4

View File

@ -26,6 +26,22 @@ class SevenPlusIE(BrightcoveNewIE):
'format': 'bestvideo', 'format': 'bestvideo',
'skip_download': True, 'skip_download': True,
} }
}, {
'url': 'https://7plus.com.au/MDAY?episode-id=MDAY5-001',
'info_dict': {
'id': 'MDAY5-001',
'ext': 'mp4',
'title': 'S5 E1 - Invisible Killer',
'description': 'md5:bea06aef0fe4bdefb2dce2e6af873fab',
'uploader_id': '5303576322001',
'upload_date': '20180219',
'timestamp': 1519012651,
'series': 'Air Crash Investigations',
},
'params': {
'format': 'bestvideo',
'skip_download': True,
}
}, { }, {
'url': 'https://7plus.com.au/UUUU?episode-id=AUMS43-001', 'url': 'https://7plus.com.au/UUUU?episode-id=AUMS43-001',
'only_matching': True, 'only_matching': True,
@ -65,8 +81,7 @@ class SevenPlusIE(BrightcoveNewIE):
if value: if value:
info[dst_key] = value info[dst_key] = value
if info['title'] is None: webpage = self._download_webpage(url, episode_id)
webpage = self._download_webpage(url, episode_id) info['series'] = self._search_regex(r'<title>([^>|]+) | 7plus</title>', webpage, 'title')
info['title'] = self._search_regex(r'<title>([^>]+)</title>', webpage, 'title')
return info return info