Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sitemap-url-parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sitemap-url-parser

  • 0.1.1
  • PyPI
  • Socket score

Maintainers
1

Sitemap Parser

Under construction! Not ready for use yet! Currently experimenting and planning!

Developed by Satyam Singh 2024

Examples of How To Use (Alpha Version)

Initialise SitemapScraper

from sitemap_url_parser import BaseSitemapScraper

scraper = BaseSitemapScraper(
    restaurant_name="Wendy's", # the name of the restaurant (this will be changed to scrape any sites, not just restaurants)
    source_path="https://locations.wendys.com/sitemap.xml", # path to the sitemap URL
    result_path="Sitemaps/wendys.csv", # path where the output CSV will be saved
    url_component_length=7, # Check for only saving the URL with at least the given number of datapoints
    datapoints={
    "base_url": 2,
    "country": 3,
    "state": 4,
    "city": 5,
    "location": 6,
    }, # mapping of which data resides at which index in the URL (index are calulated by splitting URL on '/')
    substring_check="https://locations.wendys.com", # Check for asserting a specific substring that must be present in the URL
)
scraper.scrape()

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc