diff --git a/oxweb/imdb.py b/oxweb/imdb.py index 53393d2..a642421 100644 --- a/oxweb/imdb.py +++ b/oxweb/imdb.py @@ -10,12 +10,17 @@ from BeautifulSoup import BeautifulSoup import chardet import oxlib from oxlib import stripTags, decodeHtml, findRe, findString -from oxlib.cache import getUrl, getUrlUnicode +import oxlib.cache from oxlib.normalize import normalizeTitle, normalizeImdbId from oxlib import * import google +''' + never timeout imdb data, to update cache remove data from cache folder +''' +def getUrlUnicode(url, data=None, headers=oxlib.cache.DEFAULT_HEADERS, timeout=-1): + return oxlib.cache.getUrlUnicode(url, data, headers, timeout) def getMovieId(title, director='', year=''): ''' @@ -330,7 +335,7 @@ def getMovieTrivia(imdbId): def getMovieConnections(imdbId): url = "%s/movieconnections" % getUrlBase(imdbId) - data = getUrl(url) + data = getUrlUnicode(url) connections={} for c in re.compile('''