]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/thisav.py
4473a3c773c3d9c4c26361e907769e8bb1ac9fad
2 from __future__
import unicode_literals
6 from .jwplatform
import JWPlatformBaseIE
7 from ..utils
import remove_end
10 class ThisAVIE(JWPlatformBaseIE
):
11 _VALID_URL
= r
'https?://(?:www\.)?thisav\.com/video/(?P<id>[0-9]+)/.*'
13 'url': 'http://www.thisav.com/video/47734/%98%26sup1%3B%83%9E%83%82---just-fit.html',
14 'md5': '0480f1ef3932d901f0e0e719f188f19b',
18 'title': '高樹マリア - Just fit',
20 'uploader_id': 'dj7970'
23 'url': 'http://www.thisav.com/video/242352/nerdy-18yo-big-ass-tattoos-and-glasses.html',
24 'md5': 'ba90c076bd0f80203679e5b60bf523ee',
28 'title': 'Nerdy 18yo Big Ass Tattoos and Glasses',
29 'uploader': 'cybersluts',
30 'uploader_id': 'cybersluts',
34 def _real_extract(self
, url
):
35 mobj
= re
.match(self
._VALID
_URL
, url
)
37 video_id
= mobj
.group('id')
38 webpage
= self
._download
_webpage
(url
, video_id
)
39 title
= remove_end(self
._html
_search
_regex
(
40 r
'<title>([^<]+)</title>', webpage
, 'title'),
41 ' - 視頻 - ThisAV.com-世界第一中文成人娛樂網站')
42 video_url
= self
._html
_search
_regex
(
43 r
"addVariable\('file','([^']+)'\);", webpage
, 'video url', default
=None)
51 info_dict
= self
._extract
_jwplayer
_data
(
52 webpage
, video_id
, require_title
=False)
53 uploader
= self
._html
_search
_regex
(
54 r
': <a href="http://www.thisav.com/user/[0-9]+/(?:[^"]+)">([^<]+)</a>',
55 webpage
, 'uploader name', fatal
=False)
56 uploader_id
= self
._html
_search
_regex
(
57 r
': <a href="http://www.thisav.com/user/[0-9]+/([^"]+)">(?:[^<]+)</a>',
58 webpage
, 'uploader id', fatal
=False)
63 'uploader_id': uploader_id
,