include first poster
This commit is contained in:
parent
0f74f3efff
commit
f73e043d64
1 changed files with 5 additions and 1 deletions
|
@ -23,10 +23,14 @@ def getData(id):
|
||||||
'url': getUrl(id)
|
'url': getUrl(id)
|
||||||
}
|
}
|
||||||
html = readUrlUnicode(data['url'])
|
html = readUrlUnicode(data['url'])
|
||||||
data['imdbId'] = findRe(html, 'imdb.com/title/tt(.*?) ')
|
data['imdbId'] = findRe(html, 'imdb.com/title/tt(\d{7})')
|
||||||
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=')
|
||||||
|
if poster:
|
||||||
|
poster = 'http://www.impawards.com/%s/%s' % (data['year'], poster)
|
||||||
|
data['posters'].append(poster)
|
||||||
results = re.compile('<a href = (%s.*?html)' % id[5:], re.DOTALL).findall(html)
|
results = re.compile('<a href = (%s.*?html)' % id[5:], re.DOTALL).findall(html)
|
||||||
for result in results:
|
for result in results:
|
||||||
result = result.replace('_xlg.html', '.html')
|
result = result.replace('_xlg.html', '.html')
|
||||||
|
|
Loading…
Reference in a new issue