]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/thisav.py
2 from __future__
import unicode_literals
5 from .common
import InfoExtractor
6 from ..utils
import remove_end
9 class ThisAVIE(InfoExtractor
):
10 _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'
24 'url': 'http://www.thisav.com/video/242352/nerdy-18yo-big-ass-tattoos-and-glasses.html',
25 'md5': 'ba90c076bd0f80203679e5b60bf523ee',
29 'title': 'Nerdy 18yo Big Ass Tattoos and Glasses',
30 'uploader': 'cybersluts',
31 'uploader_id': 'cybersluts',
35 def _real_extract(self
, url
):
36 mobj
= self
._match
_valid
_url
(url
)
38 video_id
= mobj
.group('id')
39 webpage
= self
._download
_webpage
(url
, video_id
)
40 title
= remove_end(self
._html
_search
_regex
(
41 r
'<title>([^<]+)</title>', webpage
, 'title'),
42 ' - 視頻 - ThisAV.com-世界第一中文成人娛樂網站')
43 video_url
= self
._html
_search
_regex
(
44 r
"addVariable\('file','([^']+)'\);", webpage
, 'video url', default
=None)
52 entries
= self
._parse
_html
5_media
_entries
(url
, webpage
, video_id
)
54 info_dict
= entries
[0]
56 info_dict
= self
._extract
_jwplayer
_data
(
57 webpage
, video_id
, require_title
=False)
58 uploader
= self
._html
_search
_regex
(
59 r
': <a href="http://www\.thisav\.com/user/[0-9]+/(?:[^"]+)">([^<]+)</a>',
60 webpage
, 'uploader name', fatal
=False)
61 uploader_id
= self
._html
_search
_regex
(
62 r
': <a href="http://www\.thisav\.com/user/[0-9]+/([^"]+)">(?:[^<]+)</a>',
63 webpage
, 'uploader id', fatal
=False)
68 'uploader_id': uploader_id
,