1 from __future__ import unicode_literals
5 from .common import InfoExtractor
15 class QuickVidIE(InfoExtractor):
16 _VALID_URL = r'https?://(www\.)?quickvid\.org/watch\.php\?v=(?P<id>[a-zA-Z_0-9-]+)'
18 'url': 'http://quickvid.org/watch.php?v=sUQT3RCG8dx',
19 'md5': 'c0c72dd473f260c06c808a05d19acdc5',
23 'title': 'Nick Offerman\'s Summer Reading Recap',
24 'thumbnail': 're:^https?://.*\.(?:png|jpg|gif)$',
29 def _real_extract(self, url):
30 video_id = self._match_id(url)
31 webpage = self._download_webpage(url, video_id)
33 title = self._html_search_regex(r'<h2>(.*?)</h2>', webpage, 'title')
34 view_count = int_or_none(self._html_search_regex(
35 r'(?s)<div id="views">(.*?)</div>',
36 webpage, 'view count', fatal=False))
37 video_code = self._search_regex(
38 r'(?s)<video id="video"[^>]*>(.*?)</video>', webpage, 'video code')
41 'url': compat_urlparse.urljoin(url, src),
42 'format_id': determine_ext(src, None),
43 } for src in re.findall('<source\s+src="([^"]+)"', video_code)
45 self._sort_formats(formats)
51 'thumbnail': self._og_search_thumbnail(webpage),
52 'view_count': view_count,