From b3345523b4d63b3e66130e8f4cdfffd7505d66a1 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 18 Jul 2010 20:24:36 +0200 Subject: [PATCH] somtimes its better to just make one imdb request --- ox/web/imdb.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index f9c7375..664c8ec 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -236,6 +236,15 @@ class Imdb(SiteParser): if key in self: del self[key] +class ImdbCombined(Imdb): + def __init__(self, id, timeout=-1): + _regex = {} + for key in self.regex: + if self.regex[key]['page'] == 'combined': + _regex[key] = self.regex[key] + self.regex = _regex + super(ImdbCombined, self).__init__(id, timeout) + def guess(title, director='', timeout=google.DEFAULT_TIMEOUT): #FIXME: proper file -> title title = title.split('-')[0]