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.4.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

ultimate_sitemap_parser-0.4-py2.py3-none-any.whl (21.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: ultimate_sitemap_parser-0.4.tar.gz
  • Upload date:
  • Size: 18.8 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.5.6

File hashes

Hashes for ultimate_sitemap_parser-0.4.tar.gz
Algorithm Hash digest
SHA256 8ea602a6b43964aab5707d57b2fee0d0dbbec74638f64e27f6e3cba7c95bcc9d
MD5 3a72a0c2ef4023fa661c97ea451bece0
BLAKE2b-256 bc8391b87b3edde59c4b930bd376bc64f8193cd61f18c2de44aee1eeb3d0e7cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ultimate_sitemap_parser-0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 21.1 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.5.6

File hashes

Hashes for ultimate_sitemap_parser-0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 937f5d6e568fa5f3c655d932ab57c359bafde686b5f160af6ef6e268cbbbffb5
MD5 b71a0dbe6ad974a245bda18575a98aaf
BLAKE2b-256 1bcaf98d7366f6fbeafe49494cf3e259681320e0c5c1bfbb0331479b9e3e69c4

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