A simple sitemap crawler that acts as the backbone for other operations
Project description
Sitemap Crawler
sitemapcrawler is a simple, blocking Python Crawler that is the backbone of a few other projects.
You're welcome to use it, but it's only as modular as we've needed it to be, which is to say, probably not fit for projects that aren't built with this in mind.
It works pretty simply.
Installation
pip install sitemapcrawler
Usage
from sitemapcrawler import Crawler
crawler = Crawler(domain="https://yourdomain.com", sitemap="https://yourdomain.com/sitemap.xml", fetch=True)
crawler.run()
If you just want to fetch a given page, create an instance of the crawler and call it like this:
crawler.fetch_page(url="https://yourdomain.com/blog/title")
The init will create a nanoid crawl_id so that when results are persisted, they'll be associated to a given crawl, to make it easy for reports to be built against crawls and such.
Building / Distributing
python3 -m build
python3 -m twine upload dist/* --skip-existing
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sitemapcrawler-0.0.1.tar.gz.
File metadata
- Download URL: sitemapcrawler-0.0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2b81d09ab0a3e291f822112705158869ac2e62d9d9777d68df0e2dfc86d6ef9
|
|
| MD5 |
a26eed562c81a6076d7e198c0e09e254
|
|
| BLAKE2b-256 |
0cfa8f0e3acfd638636b2059be5d0440635ebb0f0a57d7093e199d5fb4fdadbc
|
File details
Details for the file sitemapcrawler-0.0.1-py3-none-any.whl.
File metadata
- Download URL: sitemapcrawler-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36cf4553f0030ae132c7fa6f15b03846b50209c73102819dd8515fa86103640e
|
|
| MD5 |
1b3285357dbd6385bc7907d8d2e6fc12
|
|
| BLAKE2b-256 |
612021ffa645e18fbfe551ea2368491a022cadf567180aedeac959c5691888ab
|