]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/drtuber.py
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$',
23 def _real_extract(self
, url
):
24 mobj
= re
.match(self
._VALID
_URL
, url
)
25 video_id
= mobj
.group('id')
27 webpage
= self
._download
_webpage
(url
, video_id
)
29 video_url
= self
._html
_search
_regex
(
30 r
'<source src="([^"]+)"', webpage
, 'video URL')
32 title
= self
._html
_search
_regex
(
33 r
'<title>([^<]+)\s*-\s*Free', webpage
, 'title')
35 thumbnail
= self
._html
_search
_regex
(
37 webpage
, 'thumbnail', fatal
=False)
39 cats_str
= self
._html
_search
_regex
(
40 r
'<meta name="keywords" content="([^"]+)"', webpage
, 'categories', fatal
=False)
41 categories
= None if cats_str
is None else cats_str
.split(' ')
47 'thumbnail': thumbnail
,
48 'categories': categories
,
49 'age_limit': self
._rta
_search
(webpage
),