minor cleanup

This commit is contained in:
Rolux 2008-07-25 16:51:39 +02:00
parent a2b00c795f
commit 218ff56ed7

View file

@ -7,8 +7,8 @@ from oxlib import stripTags, findRe
from oxlib.cache import getUrlUnicode
def getMovieData(allmovieId):
html = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=1:%s~T0" % allmovieId)
data = {}
html = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=1:%s~T0" % allmovieId)
data['poster'] = findRe(html, '<img src="(http://image.*?)"')
data['year'] = findRe(html, '<a href="/cg/avg.dll\?p=avg&amp;sql=24:\d{4}">(\d{4})</a>')
data['runtime'] = findRe(html, 'sql=24:\d{4}">.*?">(.*?)min.</td></tr></table>').strip()