fix impposter urls

This commit is contained in:
j 2011-02-08 12:43:00 +05:30
parent 437d90a00f
commit 4305546f8b

View file

@ -27,7 +27,7 @@ def getData(id):
data['title'] = stripTags(findRe(html, '<p class="name white">(.*?) \(<a href="alpha1.html">')) data['title'] = stripTags(findRe(html, '<p class="name white">(.*?) \(<a href="alpha1.html">'))
data['year'] = findRe(html, '\(<a href="alpha1.html">(.*?)</a>\)') data['year'] = findRe(html, '\(<a href="alpha1.html">(.*?)</a>\)')
data['posters'] = [] data['posters'] = []
poster = findRe(html, '<img src="(posters.*?)" alt=') poster = findRe(html, '<img src="(posters.*?)"')
if poster: if poster:
poster = 'http://www.impawards.com/%s/%s' % (data['year'], poster) poster = 'http://www.impawards.com/%s/%s' % (data['year'], poster)
data['posters'].append(poster) data['posters'].append(poster)
@ -42,7 +42,7 @@ def getData(id):
html = readUrlUnicode(url) html = readUrlUnicode(url)
poster = 'http://www.impawards.com/%s/%s' % (data['year'], findRe(html, '<img SRC="(.*?)"')) poster = 'http://www.impawards.com/%s/%s' % (data['year'], findRe(html, '<img SRC="(.*?)"'))
else: else:
poster = 'http://www.impawards.com/%s/%s' % (data['year'], findRe(html, '<img src="(posters.*?)" alt=')) poster = 'http://www.impawards.com/%s/%s' % (data['year'], findRe(html, '<img src="(posters.*?)"'))
data['posters'].append(poster) data['posters'].append(poster)
return data return data