fix for movieposterdb urls that do not exist
This commit is contained in:
parent
7202fcb391
commit
1ef34da4d1
1 changed files with 8 additions and 7 deletions
|
@ -23,13 +23,14 @@ def getId(url):
|
|||
def getPostersByUrl(url):
|
||||
posters = []
|
||||
html = getUrlUnicode(url)
|
||||
results = re.compile('<a href="(http://www.movieposterdb.com/group/.*?)">', re.DOTALL).findall(html)
|
||||
for result in results:
|
||||
posters += getPostersByUrl(result)
|
||||
results = re.compile('<a href="(http://www.movieposterdb.com/poster/.*?)">', re.DOTALL).findall(html)
|
||||
for result in results:
|
||||
html = getUrlUnicode(result)
|
||||
posters.append(findRe(html, '"(http://www.movieposterdb.com/posters/.*?\.jpg)"'))
|
||||
if not "The movie you requested is not found" in html:
|
||||
results = re.compile('<a href="(http://www.movieposterdb.com/group/.*?)">', re.DOTALL).findall(html)
|
||||
for result in results:
|
||||
posters += getPostersByUrl(result)
|
||||
results = re.compile('<a href="(http://www.movieposterdb.com/poster/.*?)">', re.DOTALL).findall(html)
|
||||
for result in results:
|
||||
html = getUrlUnicode(result)
|
||||
posters.append(findRe(html, '"(http://www.movieposterdb.com/posters/.*?\.jpg)"'))
|
||||
return posters
|
||||
|
||||
def getUrl(id):
|
||||
|
|
Loading…
Reference in a new issue