aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-11-28 13:49:00 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-11-28 13:49:00 +0100
commitb03d0d064c0e198aa281faacb2b5a74af7628b74 (patch)
treef05746780cb7d5dd1eabebd1d863f08d90ed658a /youtube_dl/extractor
parentd8d6148628b972b6998a8c2a5465f031a44f4004 (diff)
[imdb] Fix extraction in python 2.6
Using a regular expression because the html cannot be parsed.
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/imdb.py5
1 files changed, 3 insertions, 2 deletions
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'<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({