Change the ie_name of YoutubeSearchDateIE
[youtube-dl] / youtube_dl / extractor / imdb.py
index 07e4f7d29fba010b26965e0656798bc243b809bc..d8e9712a7acd39db97c8a55b2551137ca0e56a41 100644 (file)
@@ -38,15 +38,15 @@ class ImdbIE(InfoExtractor):
             format_page = self._download_webpage(
                 compat_urlparse.urljoin(url, f_path),
                 u'Downloading info for %s format' % f_id)
-            json_data = get_element_by_attribute('class', 'imdb-player-data',
-                format_page)
+            json_data = self._search_regex(
+                r'<script[^>]+class="imdb-player-data"[^>]*?>(.*?)</script>',
+                format_page, u'json data', flags=re.DOTALL)
             info = json.loads(json_data)
             format_info = info['videoPlayerObject']['video']
             formats.append({
                 'format_id': f_id,
                 'url': format_info['url'],
-                'height': format_info['height'],
-                'width': format_info['width'],
+                'height': int(info['titleObject']['encoding']['selected'][:-1]),
             })
 
         return {