2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..compat
import compat_urllib_parse_unquote
8 class XNXXIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:video|www)\.xnxx\.com/video-?(?P<id>[0-9a-z]+)/'
11 'url': 'http://www.xnxx.com/video-55awb78/skyrim_test_video',
12 'md5': 'ef7ecee5af78f8b03dca2cf31341d3a0',
16 'title': 'Skyrim Test Video',
20 'url': 'http://video.xnxx.com/video1135332/lida_naked_funny_actress_5_',
21 'only_matching': True,
23 'url': 'http://www.xnxx.com/video-55awb78/',
24 'only_matching': True,
27 def _real_extract(self
, url
):
28 video_id
= self
._match
_id
(url
)
29 webpage
= self
._download
_webpage
(url
, video_id
)
31 video_url
= self
._search
_regex
(r
'flv_url=(.*?)&',
33 video_url
= compat_urllib_parse_unquote(video_url
)
35 video_title
= self
._html
_search
_regex
(r
'<title>(.*?)\s+-\s+XNXX.COM',
38 video_thumbnail
= self
._search
_regex
(r
'url_bigthumb=(.*?)&',
39 webpage
, 'thumbnail', fatal
=False)
46 'thumbnail': video_thumbnail
,