1 from .common
import InfoExtractor
2 from ..utils
import url_basename
5 class BehindKinkIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?behindkink\.com/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<day>[0-9]{2})/(?P<id>[^/#?_]+)'
9 'url': 'http://www.behindkink.com/2014/12/05/what-are-you-passionate-about-marley-blaze/',
10 'md5': '507b57d8fdcd75a41a9a7bdb7989c762',
14 'title': 'What are you passionate about – Marley Blaze',
15 'description': 'md5:aee8e9611b4ff70186f752975d9b94b4',
16 'upload_date': '20141205',
17 'thumbnail': 'http://www.behindkink.com/wp-content/uploads/2014/12/blaze-1.jpg',
22 def _real_extract(self
, url
):
23 mobj
= self
._match
_valid
_url
(url
)
24 display_id
= mobj
.group('id')
26 webpage
= self
._download
_webpage
(url
, display_id
)
28 video_url
= self
._search
_regex
(
29 r
'<source src="([^"]+)"', webpage
, 'video URL')
30 video_id
= url_basename(video_url
).split('_')[0]
31 upload_date
= mobj
.group('year') + mobj
.group('month') + mobj
.group('day')
35 'display_id': display_id
,
37 'title': self
._og
_search
_title
(webpage
),
38 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
39 'description': self
._og
_search
_description
(webpage
),
40 'upload_date': upload_date
,