Skip to main content

Ultimate Sitemap Parser

Project description

Build Status Documentation Status Coverage Status PyPI package

Website sitemap parser for Python 3.5+.

Features

Installation

pip install ultimate_sitemap_parser

Usage

from usp.tree import sitemap_tree_for_homepage

tree = sitemap_tree_for_homepage('https://www.nytimes.com/')
print(tree)

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.

If you’d like to just list all the pages found in all of the sitemaps within the website, consider using all_pages() method:

# all_pages() returns an Iterator
for page in tree.all_pages():
    print(page)

all_pages() method will return an iterator yielding SitemapPage objects; see a reference of SitemapPage.

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

ultimate_sitemap_parser-0.5.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

ultimate_sitemap_parser-0.5-py2.py3-none-any.whl (23.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ultimate_sitemap_parser-0.5.tar.gz.

File metadata

  • Download URL: ultimate_sitemap_parser-0.5.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7

File hashes

Hashes for ultimate_sitemap_parser-0.5.tar.gz
Algorithm Hash digest
SHA256 9825fefcdf515e2748addc7ec5dcdb6430dfdd4ef5de4a54e39de1e7613d0ece
MD5 362e6e5d4b993d6e89eb4a259ccd029e
BLAKE2b-256 214404eada3b1b1f825eb18b93e385ff652778c96902788b87a9b1e0a141ccff

See more details on using hashes here.

File details

Details for the file ultimate_sitemap_parser-0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: ultimate_sitemap_parser-0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7

File hashes

Hashes for ultimate_sitemap_parser-0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 806e723eeb0293c38e111822d651e987b1494ae9c08be82e73172ade667418a6
MD5 5479eb21fc1626a54642dc06ae9613de
BLAKE2b-256 ee58a6394d980bda84c44b442a3bab5ceb49626d01d4b17fbc7fe6d41b90c496

See more details on using hashes here.

Supported by

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