1 from __future__ import unicode_literals
5 from .common import InfoExtractor
8 class DrTuberIE(InfoExtractor):
9 _VALID_URL = r'https?://(?:www\.)?drtuber\.com/video/(?P<id>\d+)/(?P<title_dash>[\w-]+)'
11 'url': 'http://www.drtuber.com/video/1740434/hot-perky-blonde-naked-golf',
12 'md5': '93e680cf2536ad0dfb7e74d94a89facd',
16 'title': 'Hot Perky Blonde Naked Golf',
17 'categories': list, # NSFW
18 'thumbnail': 're:https?://.*\.jpg$',
22 def _real_extract(self, url):
23 mobj = re.match(self._VALID_URL, url)
24 video_id = mobj.group('id')
26 webpage = self._download_webpage(url, video_id)
28 video_url = self._html_search_regex(
29 r'<source src="([^"]+)"', webpage, 'video URL')
31 title = self._html_search_regex(
32 r'<title>([^<]+)\s*-\s*Free', webpage, 'title')
34 thumbnail = self._html_search_regex(
36 webpage, 'thumbnail', fatal=False)
38 categories_str = self._html_search_regex(
39 r'<meta name="keywords" content="([^"]+)"', webpage, 'categories', fatal=False)
40 categories = categories_str.split(' ')
46 'thumbnail': thumbnail,
47 'categories': categories,