From c0faa77cce85ec8ade96927c9ce2ff5dd166aff6 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 22 May 2019 11:13:24 -0700 Subject: bs4 XML parse cleanup --- python/fatcat_tools/importers/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/fatcat_tools/importers/common.py b/python/fatcat_tools/importers/common.py index c0742914..4d7b29fb 100644 --- a/python/fatcat_tools/importers/common.py +++ b/python/fatcat_tools/importers/common.py @@ -583,6 +583,7 @@ class Bs4XmlLinesPusher(RecordPusher): continue soup = BeautifulSoup(line, "xml") self.importer.push_record(soup) + soup.decompose() counts = self.importer.finish() print(counts) return counts @@ -600,6 +601,7 @@ class Bs4XmlFilePusher(RecordPusher): for record in soup.find_all(self.record_tag): self.importer.push_record(record) counts = self.importer.finish() + soup.decompose() print(counts) return counts -- cgit v1.2.3