Implemented requested changes.
- Removed unused capture group from URL regex. - Removed tests for additional series with similar names. - Relaxed regex for parsing the video ID from webpage HTML. - Use video_id instead of id to prevent shadowing of built-in names.
This commit is contained in:
parent
d813976ba7
commit
1c14824282
@ -6,7 +6,7 @@ from .nexx import NexxIE
|
||||
|
||||
|
||||
class Tele5IE(InfoExtractor):
|
||||
_VALID_URL = r'https://www.tele5.de/(mediathek/filme-online/videos|tv/).*'
|
||||
_VALID_URL = r'https://www.tele5.de/[mediathek/filme-online/videos|tv/]'
|
||||
|
||||
_TESTS = [{
|
||||
'url': 'https://www.tele5.de/mediathek/filme-online/videos?vid=1550589',
|
||||
@ -26,33 +26,15 @@ class Tele5IE(InfoExtractor):
|
||||
'timestamp': 1533664358,
|
||||
'upload_date': '20180807'
|
||||
}
|
||||
}, {
|
||||
'url': 'https://www.tele5.de/tv/relic-hunter/videos',
|
||||
'info_dict': {
|
||||
'id': '1548034',
|
||||
'ext': 'mp4',
|
||||
'timestamp': 1533577964,
|
||||
'upload_date': '20180806',
|
||||
'title': 'Mr. Right'
|
||||
}
|
||||
}, {
|
||||
'url': 'https://www.tele5.de/tv/buffy-im-bann-der-daemonen/videos',
|
||||
'info_dict': {
|
||||
'id': '1547129',
|
||||
'ext': 'mp4',
|
||||
'upload_date': '20180730',
|
||||
'timestamp': 1532967491,
|
||||
'title': 'Der Höllenhund'
|
||||
}
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
webpage = self._download_webpage(url, 'N/A')
|
||||
|
||||
id = self._html_search_regex(
|
||||
r'class="ce_videoelementnexx-video__player"\sid="video-player"\sdata-id="(?P<id>[0-9]+)"',
|
||||
video_id = self._html_search_regex(
|
||||
r'id="video-player"\sdata-id="(?P<id>[0-9]+)"',
|
||||
webpage, 'id')
|
||||
|
||||
return self.url_result(
|
||||
'https://api.nexx.cloud/v3/759/videos/byid/%s'
|
||||
% id, ie=NexxIE.ie_key())
|
||||
% video_id, ie=NexxIE.ie_key())
|
||||
|
Loading…
x
Reference in New Issue
Block a user