diff --git a/youtube_dl/extractor/imdb.py b/youtube_dl/extractor/imdb.py index 07e4f7d29f..520edc7d0c 100644 --- a/youtube_dl/extractor/imdb.py +++ b/youtube_dl/extractor/imdb.py @@ -38,8 +38,9 @@ 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']+class="imdb-player-data"[^>]*?>(.*?)', + format_page, u'json data', flags=re.DOTALL) info = json.loads(json_data) format_info = info['videoPlayerObject']['video'] formats.append({