2 from __future__ import unicode_literals
6 from .common import InfoExtractor
7 from ..utils import remove_end
10 class ThisAVIE(InfoExtractor):
11 _VALID_URL = r'https?://(?:www\.)?thisav\.com/video/(?P<id>[0-9]+)/.*'
14 'url': 'http://www.thisav.com/video/47734/%98%26sup1%3B%83%9E%83%82---just-fit.html',
15 'md5': '0480f1ef3932d901f0e0e719f188f19b',
19 'title': '高樹マリア - Just fit',
21 'uploader_id': 'dj7970'
25 'url': 'http://www.thisav.com/video/242352/nerdy-18yo-big-ass-tattoos-and-glasses.html',
26 'md5': 'ba90c076bd0f80203679e5b60bf523ee',
30 'title': 'Nerdy 18yo Big Ass Tattoos and Glasses',
31 'uploader': 'cybersluts',
32 'uploader_id': 'cybersluts',
36 def _real_extract(self, url):
37 mobj = re.match(self._VALID_URL, url)
39 video_id = mobj.group('id')
40 webpage = self._download_webpage(url, video_id)
41 title = remove_end(self._html_search_regex(
42 r'<title>([^<]+)</title>', webpage, 'title'),
43 ' - 視頻 - ThisAV.com-世界第一中文成人娛樂網站')
44 video_url = self._html_search_regex(
45 r"addVariable\('file','([^']+)'\);", webpage, 'video url', default=None)
53 entries = self._parse_html5_media_entries(url, webpage, video_id)
55 info_dict = entries[0]
57 info_dict = self._extract_jwplayer_data(
58 webpage, video_id, require_title=False)
59 uploader = self._html_search_regex(
60 r': <a href="http://www\.thisav\.com/user/[0-9]+/(?:[^"]+)">([^<]+)</a>',
61 webpage, 'uploader name', fatal=False)
62 uploader_id = self._html_search_regex(
63 r': <a href="http://www\.thisav\.com/user/[0-9]+/([^"]+)">(?:[^<]+)</a>',
64 webpage, 'uploader id', fatal=False)
69 'uploader_id': uploader_id,