From 7db8b8a0a7561bb8b26ec78f89b408c91cba1878 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 17 Aug 2018 18:17:16 +0300 Subject: [PATCH] Minor tweaks to the item scraping script --- scrape-item-data.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.43.0