fix wikipedia poster urls
This commit is contained in:
parent
daf79e8d52
commit
b12e6f1b5c
1 changed files with 6 additions and 1 deletions
|
@ -101,8 +101,13 @@ def getMovieData(wikipediaUrl):
|
||||||
return filmbox
|
return filmbox
|
||||||
|
|
||||||
def getImageUrl(name):
|
def getImageUrl(name):
|
||||||
data = readUrlUnicode('http://en.wikipedia.org/wiki/Image:' + name)
|
url = 'http://en.wikipedia.org/wiki/Image:' + name.replace(' ', '%20')
|
||||||
|
data = readUrlUnicode(url)
|
||||||
url = findRe(data, 'href="(http://upload.wikimedia.org/.*?)"')
|
url = findRe(data, 'href="(http://upload.wikimedia.org/.*?)"')
|
||||||
|
if not url:
|
||||||
|
url = findRe(data, 'href="(//upload.wikimedia.org/.*?)"')
|
||||||
|
if url:
|
||||||
|
url = 'http:' + url
|
||||||
return url
|
return url
|
||||||
|
|
||||||
def getPosterUrl(wikipediaUrl):
|
def getPosterUrl(wikipediaUrl):
|
||||||
|
|
Loading…
Reference in a new issue