]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Fix einthusan parser
authorj <j@mailb.org>
Tue, 15 Dec 2015 20:37:47 +0000 (21:37 +0100)
committerSergey M․ <dstftw@gmail.com>
Thu, 31 Dec 2015 20:38:50 +0000 (02:38 +0600)
youtube_dl/extractor/einthusan.py

index 5dfea0d39c4a45b9e4eedede4e4737700f50bae8..bc6def65e1b153e06730f1c2d82b467d94329d0e 100644 (file)
@@ -41,9 +41,12 @@ class EinthusanIE(InfoExtractor):
         video_title = self._html_search_regex(
             r'<h1><a class="movie-title".*?>(.*?)</a></h1>', webpage, 'title')
 
-        video_url = self._html_search_regex(
-            r'''(?s)jwplayer\("mediaplayer"\)\.setup\({.*?'file': '([^']+)'.*?}\);''',
-            webpage, 'video url')
+        movieid = self._html_search_regex(
+            r'data-movieid="(.*?)"', webpage, 'movieid')
+
+        location = 'Washington'
+        geturl = 'http://cdn.einthusan.com/geturl/%s/hd/%s' % (movieid, location)
+        video_url = self._download_webpage(geturl, video_id)
 
         description = self._html_search_meta('description', webpage)
         thumbnail = self._html_search_regex(