Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sitemapcrawler-0.0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sitemapcrawler-0.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

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

Hashes for sitemapcrawler-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b2b81d09ab0a3e291f822112705158869ac2e62d9d9777d68df0e2dfc86d6ef9
MD5 a26eed562c81a6076d7e198c0e09e254
BLAKE2b-256 0cfa8f0e3acfd638636b2059be5d0440635ebb0f0a57d7093e199d5fb4fdadbc

See more details on using hashes here.

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

Hashes for sitemapcrawler-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36cf4553f0030ae132c7fa6f15b03846b50209c73102819dd8515fa86103640e
MD5 1b3285357dbd6385bc7907d8d2e6fc12
BLAKE2b-256 612021ffa645e18fbfe551ea2368491a022cadf567180aedeac959c5691888ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page