X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Feinthusan.py;h=5dfea0d39c4a45b9e4eedede4e4737700f50bae8;hb=a47b602b0877dcde1b795bf53bfe3629c6595870;hp=712368fafd0cf66f09146dfbed36a91d4651b11d;hpb=2eebf060af9fe284cbcb839886b27030553fb48d;p=youtube-dl diff --git a/youtube_dl/extractor/einthusan.py b/youtube_dl/extractor/einthusan.py index 712368faf..5dfea0d39 100644 --- a/youtube_dl/extractor/einthusan.py +++ b/youtube_dl/extractor/einthusan.py @@ -7,16 +7,17 @@ from .common import InfoExtractor class EinthusanIE(InfoExtractor): - _VALID_URL = r'http://(?:www\.)?einthusan\.com/movies/watch.php\?(.*)?id=(?P[0-9]+).*?' + _VALID_URL = r'https?://(?:www\.)?einthusan\.com/movies/watch.php\?([^#]*?)id=(?P[0-9]+)' _TESTS = [ { - 'url': 'http://www.einthusan.com/movies/watch.php?hindimoviesonline=Ek+Villain&lang=hindi&id=2447', + 'url': 'http://www.einthusan.com/movies/watch.php?id=2447', 'md5': 'af244f4458cd667205e513d75da5b8b1', 'info_dict': { 'id': '2447', 'ext': 'mp4', 'title': 'Ek Villain', 'thumbnail': 're:^https?://.*\.jpg$', + 'description': 'md5:9d29fc91a7abadd4591fb862fa560d93', } }, { @@ -27,6 +28,7 @@ class EinthusanIE(InfoExtractor): 'ext': 'mp4', 'title': 'Soodhu Kavvuum', 'thumbnail': 're:^https?://.*\.jpg$', + 'description': 'md5:05d8a0c0281a4240d86d76e14f2f4d51', } }, ] @@ -36,19 +38,24 @@ class EinthusanIE(InfoExtractor): video_id = mobj.group('id') webpage = self._download_webpage(url, video_id) - video_title = self._html_search_regex(r'''

(.*?)

''', webpage, 'title') + video_title = self._html_search_regex( + r'

(.*?)

', webpage, 'title') video_url = self._html_search_regex( - r'''(?s)jwplayer\("mediaplayer"\)\.setup\({.*?'file': '([^']+)'.*?}\);''', webpage, 'video url') + r'''(?s)jwplayer\("mediaplayer"\)\.setup\({.*?'file': '([^']+)'.*?}\);''', + webpage, 'video url') - thumb_rel_url = self._html_search_regex( - r'''''', webpage, "thumbnail url") - thumb_abs_url = re.sub('\.\.', 'http://www.einthusan.com', thumb_rel_url) + description = self._html_search_meta('description', webpage) + thumbnail = self._html_search_regex( + r'''''', + webpage, "thumbnail url", fatal=False) + if thumbnail is not None: + thumbnail = thumbnail.replace('..', 'http://www.einthusan.com') return { 'id': video_id, - 'ext': 'mp4', 'title': video_title, 'url': video_url, - 'thumbnail': thumb_abs_url, + 'thumbnail': thumbnail, + 'description': description, }