aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-05-21 16:45:27 -0700
committerBryan Newbold <bnewbold@archive.org>2021-05-21 16:45:27 -0700
commitadd030c447fbc2d1a91b0756c395737aa796fef0 (patch)
tree3a5f28a8fb66475aa235faedc83e147eb71a0721
parentaf50cb970644e968ed329f268181d507073b2789 (diff)
downloadsandcrawler-add030c447fbc2d1a91b0756c395737aa796fef0.tar.gz
sandcrawler-add030c447fbc2d1a91b0756c395737aa796fef0.zip
html ingest: remove whitespace around relative URLs (eg, for d-lib)
-rw-r--r--python/sandcrawler/html_metadata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/sandcrawler/html_metadata.py b/python/sandcrawler/html_metadata.py
index 1c054fa..1e58778 100644
--- a/python/sandcrawler/html_metadata.py
+++ b/python/sandcrawler/html_metadata.py
@@ -599,7 +599,7 @@ def _extract_generic(doc: HTMLParser, selector: str, attrs: List[str], type_name
continue
url = node.attrs.get(attr)
if url:
- resources.append(dict(url=url, type=type_name))
+ resources.append(dict(url=url.strip(), type=type_name))
return resources