From 7d9c3da7609135f8ef2bf7bdf3977e60faccb149 Mon Sep 17 00:00:00 2001 From: Rolux Date: Fri, 25 Jul 2008 16:22:28 +0200 Subject: [PATCH] allmovie: parse cast --- oxweb/allmovie.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/oxweb/allmovie.py b/oxweb/allmovie.py index 978125d..6fc072e 100644 --- a/oxweb/allmovie.py +++ b/oxweb/allmovie.py @@ -20,6 +20,14 @@ def getMovieData(allmovieId): data['themes'] = parseList(html, 'Themes') html = getUrlUnicode("http://www.allmovie.com/cg/avg.dll?p=avg&sql=1:%s~T1" % allmovieId) data['review'] = stripTags(findRe(html, 'Review.*?

(.*?)')) + 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(' -') + ), + findRe(html, '

(.*?)').split('')[:-1] + ) return data def getMoviePoster(allmovieId):