From: Mikko Rasa Date: Fri, 17 Aug 2018 15:17:16 +0000 (+0300) Subject: Minor tweaks to the item scraping script X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7db8b8a0a7561bb8b26ec78f89b408c91cba1878;p=poefilter.git Minor tweaks to the item scraping script --- diff --git a/scrape-item-data.py b/scrape-item-data.py index c592ff4..84def92 100755 --- a/scrape-item-data.py +++ b/scrape-item-data.py @@ -136,7 +136,8 @@ class ItemDataParser(html.parser.HTMLParser): self.mod_names = [] elif tag=="td": self.column += 1 - self.in_cell = True + if self.in_items_table: + self.in_cell = True elif tag=="h1": self.in_heading = True @@ -166,7 +167,7 @@ class ItemDataParser(html.parser.HTMLParser): if self.current_heading=="Staff": self.current_heading = "Stave" self.headings.append(self.current_heading) - elif self.in_items_table and self.in_cell: + elif self.in_cell: if self.mod_row: if self.column==1: self.mod_names.append(data)