From: Jaime Marquínez Ferrándiz Date: Thu, 28 Nov 2013 12:49:00 +0000 (+0100) Subject: [imdb] Fix extraction in python 2.6 X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=b03d0d064c0e198aa281faacb2b5a74af7628b74;p=youtube-dl [imdb] Fix extraction in python 2.6 Using a regular expression because the html cannot be parsed. --- diff --git a/youtube_dl/extractor/imdb.py b/youtube_dl/extractor/imdb.py index 07e4f7d29..520edc7d0 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({