typos, better method names
This commit is contained in:
parent
24018d70c0
commit
35b879b442
1 changed files with 8 additions and 4 deletions
|
@ -14,7 +14,7 @@ def getMovieId(title, director='', year=''):
|
||||||
return result[0][1]
|
return result[0][1]
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def getUrlByImdb(imdbId):
|
def getUrlByImdbId(imdbId):
|
||||||
query = '"imdb_id = %s"'% imdbId
|
query = '"imdb_id = %s"'% imdbId
|
||||||
result = find(query)
|
result = find(query)
|
||||||
if result:
|
if result:
|
||||||
|
@ -24,8 +24,12 @@ def getUrlByImdb(imdbId):
|
||||||
imdbId = imdbId[1:]
|
imdbId = imdbId[1:]
|
||||||
return getUrlByImdb(imdbId)
|
return getUrlByImdb(imdbId)
|
||||||
|
|
||||||
def getUrlByAmbId(amg_id):
|
def getUrlByImdb(imdbId):
|
||||||
query = '"amg_id = %s"'% amg_id
|
# deprecated, use getUrlByImdbId()
|
||||||
|
return getUrlByImdbId(imdbId)
|
||||||
|
|
||||||
|
def getUrlByAllmovieId(allmovieId):
|
||||||
|
query = '"amg_id = %s"'% allmovieId
|
||||||
result = find(query)
|
result = find(query)
|
||||||
if result:
|
if result:
|
||||||
url = result[0][1]
|
url = result[0][1]
|
||||||
|
@ -62,7 +66,7 @@ def getMoviePoster(wikipediaUrl):
|
||||||
return getImageUrl(data['image'])
|
return getImageUrl(data['image'])
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def getAmgId(wikipediaUrl):
|
def getAllmovieId(wikipediaUrl):
|
||||||
data = getMovieData(wikipediaUrl)
|
data = getMovieData(wikipediaUrl)
|
||||||
return data.get('amg_id', '')
|
return data.get('amg_id', '')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue