]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/einthusan.py
5dfea0d39c4a45b9e4eedede4e4737700f50bae8
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class EinthusanIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?einthusan\.com/movies/watch.php\?([^#]*?)id=(?P<id>[0-9]+)'
13 'url': 'http://www.einthusan.com/movies/watch.php?id=2447',
14 'md5': 'af244f4458cd667205e513d75da5b8b1',
18 'title': 'Ek Villain',
19 'thumbnail': 're:^https?://.*\.jpg$',
20 'description': 'md5:9d29fc91a7abadd4591fb862fa560d93',
24 'url': 'http://www.einthusan.com/movies/watch.php?id=1671',
25 'md5': 'ef63c7a803e22315880ed182c10d1c5c',
29 'title': 'Soodhu Kavvuum',
30 'thumbnail': 're:^https?://.*\.jpg$',
31 'description': 'md5:05d8a0c0281a4240d86d76e14f2f4d51',
36 def _real_extract(self
, url
):
37 mobj
= re
.match(self
._VALID
_URL
, url
)
38 video_id
= mobj
.group('id')
39 webpage
= self
._download
_webpage
(url
, video_id
)
41 video_title
= self
._html
_search
_regex
(
42 r
'<h1><a class="movie-title".*?>(.*?)</a></h1>', webpage
, 'title')
44 video_url
= self
._html
_search
_regex
(
45 r
'''(?s)jwplayer\("mediaplayer"\)\.setup\({.*?'file': '([^']+)'.*?}\);''',
48 description
= self
._html
_search
_meta
('description', webpage
)
49 thumbnail
= self
._html
_search
_regex
(
50 r
'''<a class="movie-cover-wrapper".*?><img src=["'](.*?)["'].*?/></a>''',
51 webpage
, "thumbnail url", fatal
=False)
52 if thumbnail
is not None:
53 thumbnail
= thumbnail
.replace('..', 'http://www.einthusan.com')
59 'thumbnail': thumbnail
,
60 'description': description
,