From e290438c75e47cbcf02f6760e38425b22f9c28f5 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 1 Nov 2011 18:37:45 +0100 Subject: [PATCH] dont lookup imdb by default --- ox/web/criterion.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ox/web/criterion.py b/ox/web/criterion.py index 4991dfb..f877f4b 100644 --- a/ox/web/criterion.py +++ b/ox/web/criterion.py @@ -15,7 +15,7 @@ def getId(url): def getUrl(id): return "http://www.criterion.com/films/%s" % id -def getData(id, timeout=ox.cache.cache_timeout): +def getData(id, timeout=ox.cache.cache_timeout, imdb=False): ''' >>> getData('1333')['imdbId'] u'0060304' @@ -70,8 +70,9 @@ def getData(id, timeout=ox.cache.cache_timeout): if timeout == ox.cache.cache_timeout: timeout = -1 - data['imdbId'] = imdb.getMovieId(data['title'], - data['director'], data['year'], timeout=timeout) + if imdb: + data['imdbId'] = imdb.getMovieId(data['title'], + data['director'], data['year'], timeout=timeout) return data def getIds():