one more place with xa0

This commit is contained in:
j 2007-07-30 12:02:30 +00:00
parent 35e8958efd
commit c862d7f50b

View file

@ -272,7 +272,7 @@ class IMDb:
soup = BeautifulSoup(data) soup = BeautifulSoup(data)
cast = soup('table', {'class': 'cast'}) cast = soup('table', {'class': 'cast'})
if cast: if cast:
cast = str(cast[0]) cast = str(cast[0]).replace(u'\xa0', ' ')
names = re.compile('<a href="/name/nm.*?/">(.*?)</a>.*?</td><td class="char">(.*?)</td></tr>').findall(cast) names = re.compile('<a href="/name/nm.*?/">(.*?)</a>.*?</td><td class="char">(.*?)</td></tr>').findall(cast)
for name in names: for name in names:
real_name = name[0] real_name = name[0]