A performant library for parsing and crawling sitemaps
Project description
Ultimate Sitemap Parser (USP) is a performant and robust Python library for parsing and crawling sitemaps.
Features
Supports all sitemap formats:
Field-tested with ~1 million URLs as part of the Media Cloud project
Error-tolerant with more common sitemap bugs
Tries to find sitemaps not listed in robots.txt
Uses fast and memory efficient Expat XML parsing
Doesn’t consume much memory even with massive sitemap hierarchies
Provides a generated sitemap tree as easy to use object tree
Supports using a custom web client
Uses a small number of actively maintained third-party modules
Reasonably tested
Installation
pip install ultimate-sitemap-parser
or using Anaconda:
conda install -c conda-forge ultimate-sitemap-parser
Usage
from usp.tree import sitemap_tree_for_homepage
tree = sitemap_tree_for_homepage('https://www.example.org/')
for page in tree.all_pages():
print(page.url)
sitemap_tree_for_homepage() will return a tree of AbstractSitemap subclass objects that represent the sitemap hierarchy found on the website; see a reference of AbstractSitemap subclasses. AbstractSitemap.all_pages() returns a generator to efficiently iterate over pages without loading the entire tree into memory.
For more examples and details, see the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ultimate_sitemap_parser-1.3.1.tar.gz
.
File metadata
- Download URL: ultimate_sitemap_parser-1.3.1.tar.gz
- Upload date:
- Size: 37.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c227dd10da5c5d6ec67c4add04170d0ee4008d966bf8c489a002bf3e85b35983 |
|
MD5 | 63ab9221df2a6d73a8c4dafe76ba4fa0 |
|
BLAKE2b-256 | 90de656c4c15be1ac512b3435d8052a0ade2fd334bf6eeda6760bcc11023f61e |
Provenance
The following attestation bundles were made for ultimate_sitemap_parser-1.3.1.tar.gz
:
Publisher:
publish.yml
on GateNLP/ultimate-sitemap-parser
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
ultimate_sitemap_parser-1.3.1.tar.gz
- Subject digest:
c227dd10da5c5d6ec67c4add04170d0ee4008d966bf8c489a002bf3e85b35983
- Sigstore transparency entry: 190224941
- Sigstore integration time:
- Permalink:
GateNLP/ultimate-sitemap-parser@b6cee1a64974b117ace5040bb6229adc5441f374
- Branch / Tag:
refs/tags/1.3.1
- Owner: https://github.com/GateNLP
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yml@b6cee1a64974b117ace5040bb6229adc5441f374
- Trigger Event:
push
- Statement type:
File details
Details for the file ultimate_sitemap_parser-1.3.1-py3-none-any.whl
.
File metadata
- Download URL: ultimate_sitemap_parser-1.3.1-py3-none-any.whl
- Upload date:
- Size: 42.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa88d3a390dd6c9dcdf1bf5c743267399a95ff596514b43562dcb8a3a8c2b5ac |
|
MD5 | c849c25b30fb40185caf1e16fae2ae70 |
|
BLAKE2b-256 | 15943c8487ae1c6ec996916df8ca0200793508aa81263c87d2ca0fec3cafeef9 |
Provenance
The following attestation bundles were made for ultimate_sitemap_parser-1.3.1-py3-none-any.whl
:
Publisher:
publish.yml
on GateNLP/ultimate-sitemap-parser
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
ultimate_sitemap_parser-1.3.1-py3-none-any.whl
- Subject digest:
fa88d3a390dd6c9dcdf1bf5c743267399a95ff596514b43562dcb8a3a8c2b5ac
- Sigstore transparency entry: 190224943
- Sigstore integration time:
- Permalink:
GateNLP/ultimate-sitemap-parser@b6cee1a64974b117ace5040bb6229adc5441f374
- Branch / Tag:
refs/tags/1.3.1
- Owner: https://github.com/GateNLP
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yml@b6cee1a64974b117ace5040bb6229adc5441f374
- Trigger Event:
push
- Statement type: