]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/hornbunny.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
11 class HornBunnyIE(InfoExtractor
):
12 _VALID_URL
= r
'http?://(?:www\.)?hornbunny\.com/videos/(?P<title_dash>[a-z-]+)-(?P<id>\d+)\.html'
14 'url': 'http://hornbunny.com/videos/panty-slut-jerk-off-instruction-5227.html',
15 'md5': 'e20fd862d1894b67564c96f180f43924',
19 'title': 'panty slut jerk off instruction',
23 'thumbnail': r
're:^https?://.*\.jpg$',
27 def _real_extract(self
, url
):
28 video_id
= self
._match
_id
(url
)
30 webpage
= self
._download
_webpage
(url
, video_id
)
31 title
= self
._og
_search
_title
(webpage
)
32 info_dict
= self
._parse
_html
5_media
_entries
(url
, webpage
, video_id
)[0]
34 duration
= parse_duration(self
._search
_regex
(
35 r
'<strong>Runtime:</strong>\s*([0-9:]+)</div>',
36 webpage
, 'duration', fatal
=False))
37 view_count
= int_or_none(self
._search
_regex
(
38 r
'<strong>Views:</strong>\s*(\d+)</div>',
39 webpage
, 'view count', fatal
=False))
45 'view_count': view_count
,