allmovie: parse cast

This commit is contained in:
Rolux 2008-07-25 16:22:28 +02:00
parent d963f1888a
commit 7d9c3da760

View file

@ -20,6 +20,14 @@ def getMovieData(allmovieId):
data['themes'] = parseList(html, 'Themes') data['themes'] = parseList(html, 'Themes')
html = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=1:%s~T1" % allmovieId) html = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=1:%s~T1" % allmovieId)
data['review'] = stripTags(findRe(html, 'Review</td>.*?<td colspan="2"><p>(.*?)</td>')) data['review'] = stripTags(findRe(html, 'Review</td>.*?<td colspan="2"><p>(.*?)</td>'))
html = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=1:%s~T2" % allmovieId)
data['cast'] = map(
lambda x: map(
lambda x: stripTags(x).strip(),
x.split('&nbsp;</td><td width="305"><i>-')
),
findRe(html, '<div id="results-table">(.*?)</table>').split('</td></tr>')[:-1]
)
return data return data
def getMoviePoster(allmovieId): def getMoviePoster(allmovieId):