mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-24 11:51:11 +01:00
[megavideoez] Add working test
This commit is contained in:
parent
fec2d97ca2
commit
f32cb5cb14
|
@ -11,6 +11,18 @@
|
||||||
|
|
||||||
class MegavideozeuIE(InfoExtractor):
|
class MegavideozeuIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?megavideoz\.eu/video/(?P<id>.*)(?:.*)'
|
_VALID_URL = r'https?://(?:www\.)?megavideoz\.eu/video/(?P<id>.*)(?:.*)'
|
||||||
|
_TESTS = [
|
||||||
|
{
|
||||||
|
'url': 'http://megavideoz.eu/video/WM6UB919XMXH/SMPTE-Universal-Film-Leader',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '48723',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'duration': '10',
|
||||||
|
'title': 'SMPTE Universal Film Leader',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
tmp_video_id = self._match_id(url)
|
tmp_video_id = self._match_id(url)
|
||||||
|
@ -29,7 +41,7 @@ def _real_extract(self, url):
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'<title><!\[CDATA\[([^\]]+)', configpage, 'title')
|
r'<title><!\[CDATA\[([^\]]+)', configpage, 'title')
|
||||||
duration = int_or_none(self._html_search_regex(
|
duration = int_or_none(self._html_search_regex(
|
||||||
r'<duration>([0-9]+)', configpage, 'duration', fatal=False))
|
r'<duration>([0-9\.]+)', configpage, 'duration', fatal=False))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user