try a bit more to find the right page on wikipedia
This commit is contained in:
parent
f7947fb72a
commit
cbe4c746b5
1 changed files with 4 additions and 2 deletions
|
@ -16,10 +16,12 @@ def getMovieId(title, director='', year=''):
|
||||||
|
|
||||||
def getUrlByImdb(imdbId):
|
def getUrlByImdb(imdbId):
|
||||||
if len(imdbId) != 7: return ''
|
if len(imdbId) != 7: return ''
|
||||||
result = find(imdbId)
|
result = find("imdb_id "+imdbId)
|
||||||
if result:
|
if result:
|
||||||
url = result[0][1]
|
url = result[0][1]
|
||||||
return url
|
data = getUrl(url)
|
||||||
|
if 'title/tt%s' % imdbId in data:
|
||||||
|
return url
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def find(query, max_results=10):
|
def find(query, max_results=10):
|
||||||
|
|
Loading…
Reference in a new issue