From 35b879b442c7c86e2a5fa519bd6d92757d957932 Mon Sep 17 00:00:00 2001 From: Rolux Date: Fri, 25 Jul 2008 14:02:06 +0200 Subject: [PATCH] typos, better method names --- oxweb/wikipedia.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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', '')