瀏覽代碼

Fix einthusan parser

j 9 年之前
父節點
當前提交
0416006a30
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      youtube_dl/extractor/einthusan.py

+ 6 - 3
youtube_dl/extractor/einthusan.py

@@ -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(