]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/thisav.py
9dcfc28b3d5214ce9c23f70c95f953a23ecdbd2e
5 from .common
import InfoExtractor
10 class ThisAVIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://(?:www\.)?thisav\.com/video/(?P<id>[0-9]+)/.*'
13 u
"url": u
"http://www.thisav.com/video/47734/%98%26sup1%3B%83%9E%83%82---just-fit.html",
14 u
"file": u
"47734.flv",
15 u
"md5": u
"0480f1ef3932d901f0e0e719f188f19b",
17 u
"title": u
"高樹マリア - Just fit",
18 u
"uploader": u
"dj7970",
19 u
"uploader_id": u
"dj7970"
23 def _real_extract(self
, url
):
24 mobj
= re
.match(self
._VALID
_URL
, url
)
26 video_id
= mobj
.group('id')
27 webpage
= self
._download
_webpage
(url
, video_id
)
28 title
= self
._html
_search
_regex
(r
'<h1>([^<]*)</h1>', webpage
, u
'title')
29 video_url
= self
._html
_search
_regex
(
30 r
"addVariable\('file','([^']+)'\);", webpage
, u
'video url')
31 uploader
= self
._html
_search
_regex
(
32 r
': <a href="http://www.thisav.com/user/[0-9]+/(?:[^"]+)">([^<]+)</a>',
33 webpage
, u
'uploader name', fatal
=False)
34 uploader_id
= self
._html
_search
_regex
(
35 r
': <a href="http://www.thisav.com/user/[0-9]+/([^"]+)">(?:[^<]+)</a>',
36 webpage
, u
'uploader id', fatal
=False)
37 ext
= determine_ext(video_url
)
44 'uploader_id': uploader_id
,