tighter keyword parsing

This commit is contained in:
j 2007-07-12 19:06:12 +00:00
parent ee5864a99d
commit 23e27d1b36

View file

@ -320,7 +320,7 @@ class IMDb:
def parseKeywords(self): def parseKeywords(self):
soup = BeautifulSoup(self.getKeywords()) soup = BeautifulSoup(self.getKeywords())
keywords = [] keywords = []
for key in soup('a', {'href': re.compile('/keyword')}): for key in soup('a', {'href': re.compile('^/keyword/')}):
keywords.append(htmldecode(key.string)) keywords.append(htmldecode(key.string))
self.keywords = keywords self.keywords = keywords
return self.keywords return self.keywords