2 from __future__ import unicode_literals
6 from .common import InfoExtractor
7 from ..utils import url_basename
8 from ..compat import compat_urlparse
11 class VidbitIE(InfoExtractor):
12 _VALID_URL = r'https?://(?:www\.)?vidbit\.co/watch\?v=(?P<id>[\w-]+)'
14 'url': 'http://www.vidbit.co/watch?v=MrM7LeaMJq',
15 'md5': 'f1a579a93282a78de7e1c53220ef0f12',
19 'title': 'RoboCop (1987) - Dick You\'re Fired',
20 'thumbnail': 'http://www.vidbit.co/thumbnails/MrM7LeaMJq.jpg',
24 def _real_extract(self, url):
25 video_id = self._match_id(url)
26 webpage = self._download_webpage(url, video_id)
30 'title': self._html_search_regex(r'<h1>(.+)</h1>', webpage, 'title'),
31 'url': compat_urlparse.urljoin(url, self._html_search_regex(r'file:\s*(["\'])((?:(?!\1).)+)\1',
32 webpage, 'video URL', group=2)),
33 'thumbnail': self._og_search_thumbnail(webpage),
34 'description': self._html_search_regex(r'description:(["\'])((?:(?!\1).)+)\1',
35 webpage, 'description', None, group=2),