namedmichi / universalSitemapLoader

A Python package to find the sitemap of a URL, even if it does not have a standard path

Home Page:https://pypi.org/project/universal-sitemap-loader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Universal Sitemap Loader

Universal Sitemap Loader the easiest way to find a Sitemap

   >>> from universal_sitemap_loader import UniversalSitemapLoader
   >>> loader = UniversalSitemapLoader("https://www.example.com/")
   >>> sitemap = loader.find_sitemap()

This tries to find the Sitemap no matter where the heck it is.

Key Features

  • Can handel compressed (.gz) files
  • Recursively gets the URL´s from all sitemaps
  • tries to find even the strangest placed sitemaps

Other functions include:

>>> urls = loader.get_urls()
or
>>> urls = loader.get_urls_from_sitemap("https://www.example.com/sitemap.xml")

Installing the Package

Universal Sitemap Loader is available on PyPI:

$ python -m pip install universal-sitemap-loader

Officially supports Python 3.7+.

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details

About

A Python package to find the sitemap of a URL, even if it does not have a standard path

https://pypi.org/project/universal-sitemap-loader/

License:GNU General Public License v3.0


Languages

Language:Python 100.0%