dont lookup imdb by default
This commit is contained in:
parent
8fe8822e09
commit
e290438c75
1 changed files with 4 additions and 3 deletions
|
@ -15,7 +15,7 @@ def getId(url):
|
||||||
def getUrl(id):
|
def getUrl(id):
|
||||||
return "http://www.criterion.com/films/%s" % 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']
|
>>> getData('1333')['imdbId']
|
||||||
u'0060304'
|
u'0060304'
|
||||||
|
@ -70,6 +70,7 @@ def getData(id, timeout=ox.cache.cache_timeout):
|
||||||
|
|
||||||
if timeout == ox.cache.cache_timeout:
|
if timeout == ox.cache.cache_timeout:
|
||||||
timeout = -1
|
timeout = -1
|
||||||
|
if imdb:
|
||||||
data['imdbId'] = imdb.getMovieId(data['title'],
|
data['imdbId'] = imdb.getMovieId(data['title'],
|
||||||
data['director'], data['year'], timeout=timeout)
|
data['director'], data['year'], timeout=timeout)
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in a new issue