diff options
| author | Jeff Buchbinder <jeff@ourexchange.net> | 2015-04-17 11:25:01 -0400 | 
|---|---|---|
| committer | Sergey M․ <dstftw@gmail.com> | 2015-04-19 04:06:45 +0600 | 
| commit | f32cb5cb147e8e6f05625ed6b5880eb566101f03 (patch) | |
| tree | afddd2ac381565899d2454b61b3b7877770f3622 | |
| parent | fec2d97ca2f1aa8b64c24b28d8c63cab052e9db4 (diff) | |
[megavideoez] Add working test
| -rw-r--r-- | youtube_dl/extractor/megavideozeu.py | 14 | 
1 files changed, 13 insertions, 1 deletions
| diff --git a/youtube_dl/extractor/megavideozeu.py b/youtube_dl/extractor/megavideozeu.py index e77b5f734..ee26b0f2e 100644 --- a/youtube_dl/extractor/megavideozeu.py +++ b/youtube_dl/extractor/megavideozeu.py @@ -11,6 +11,18 @@ from ..utils import (  class MegavideozeuIE(InfoExtractor):      _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):          tmp_video_id = self._match_id(url) @@ -29,7 +41,7 @@ class MegavideozeuIE(InfoExtractor):          title = self._html_search_regex(              r'<title><!\[CDATA\[([^\]]+)', configpage, 'title')          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 {              'id': video_id, | 
