diff --git a/oxweb/wikipedia.py b/oxweb/wikipedia.py index ea74c76..fbb2780 100644 --- a/oxweb/wikipedia.py +++ b/oxweb/wikipedia.py @@ -14,7 +14,7 @@ def getMovieId(title, director='', year=''): return result[0][1] return '' -def getUrlByImdb(imdbId): +def getUrlByImdbId(imdbId): query = '"imdb_id = %s"'% imdbId result = find(query) if result: @@ -24,8 +24,12 @@ def getUrlByImdb(imdbId): imdbId = imdbId[1:] return getUrlByImdb(imdbId) -def getUrlByAmbId(amg_id): - query = '"amg_id = %s"'% amg_id +def getUrlByImdb(imdbId): + # deprecated, use getUrlByImdbId() + return getUrlByImdbId(imdbId) + +def getUrlByAllmovieId(allmovieId): + query = '"amg_id = %s"'% allmovieId result = find(query) if result: url = result[0][1] @@ -62,7 +66,7 @@ def getMoviePoster(wikipediaUrl): return getImageUrl(data['image']) return '' -def getAmgId(wikipediaUrl): +def getAllmovieId(wikipediaUrl): data = getMovieData(wikipediaUrl) return data.get('amg_id', '')