From 23e27d1b368dd752bcfb5970b5ed885357f8410a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 12 Jul 2007 19:06:12 +0000 Subject: [PATCH] tighter keyword parsing --- scrapeit/imdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapeit/imdb.py b/scrapeit/imdb.py index 7df5632..f23282c 100644 --- a/scrapeit/imdb.py +++ b/scrapeit/imdb.py @@ -320,7 +320,7 @@ class IMDb: def parseKeywords(self): soup = BeautifulSoup(self.getKeywords()) keywords = [] - for key in soup('a', {'href': re.compile('/keyword')}): + for key in soup('a', {'href': re.compile('^/keyword/')}): keywords.append(htmldecode(key.string)) self.keywords = keywords return self.keywords