]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/pornhd.py
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
6 from ..utils
import compat_urllib_parse
9 class PornHdIE(InfoExtractor
):
10 _VALID_URL
= r
'(?:http://)?(?:www\.)?pornhd\.com/(?:[a-z]{2,4}/)?videos/(?P<video_id>[0-9]+)/(?P<video_title>.+)'
12 'url': 'http://www.pornhd.com/videos/1962/sierra-day-gets-his-cum-all-over-herself-hd-porn-video',
14 'md5': '35272469887dca97abd30abecc6cdf75',
16 "title": "sierra-day-gets-his-cum-all-over-herself-hd-porn-video",
21 def _real_extract(self
, url
):
22 mobj
= re
.match(self
._VALID
_URL
, url
)
24 video_id
= mobj
.group('video_id')
25 video_title
= mobj
.group('video_title')
27 webpage
= self
._download
_webpage
(url
, video_id
)
29 next_url
= self
._html
_search
_regex
(
30 r
'&hd=(http.+?)&', webpage
, 'video URL')
31 next_url
= compat_urllib_parse
.unquote(next_url
)
33 video_url
= self
._download
_webpage
(
34 next_url
, video_id
, note
='Retrieving video URL',
35 errnote
='Could not retrieve video URL')
43 'age_limit': age_limit
,