From: Scott Worley Date: Sat, 30 Dec 2023 11:37:44 +0000 (-0800) Subject: Rename: html → dom X-Git-Url: http://git.scottworley.com/paperdoorknob/commitdiff_plain/606c97c59b4f50d8025b3b2946f6f8a4942c5fb9?hp=b254976424d0f56fab14f8897dade345ce46a2d1 Rename: html → dom --- diff --git a/paperdoorknob.py b/paperdoorknob.py index 6a55675..05b068f 100644 --- a/paperdoorknob.py +++ b/paperdoorknob.py @@ -38,9 +38,9 @@ def process(spec: Spec) -> None: \\newcommand{\\href}[2]{#2\\footnote{#1}} ''') url = flatURL(spec.url) - html = parse(spec.htmlfilter(spec.fetcher.fetch(url))) - num_chunks = ilen(chunkDOMs(html)) - for i, r in enumerate(chunkDOMs(html)): + dom = parse(spec.htmlfilter(spec.fetcher.fetch(url))) + num_chunks = ilen(chunkDOMs(dom)) + for i, r in enumerate(chunkDOMs(dom)): percent = 100.0 * i / num_chunks spec.log(f'Processing chunk {i} of {num_chunks} ({percent:.1f}%)\r') spec.domfilter(r)