diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-05-21 16:45:27 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-05-21 16:45:27 -0700 |
commit | add030c447fbc2d1a91b0756c395737aa796fef0 (patch) | |
tree | 3a5f28a8fb66475aa235faedc83e147eb71a0721 | |
parent | af50cb970644e968ed329f268181d507073b2789 (diff) | |
download | sandcrawler-add030c447fbc2d1a91b0756c395737aa796fef0.tar.gz sandcrawler-add030c447fbc2d1a91b0756c395737aa796fef0.zip |
html ingest: remove whitespace around relative URLs (eg, for d-lib)
-rw-r--r-- | python/sandcrawler/html_metadata.py | 2 |
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 |