Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including sitemap-urls with all npm packages installed. Try it out:

var sitemapUrls = require("sitemap-urls")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

sitemap-urls v3.0.0

Extract URLs from an XML sitemap.

Sitemap Urls

Build Status Dependency Status

Extract URLs from an XML sitemap.

Sitemap Urls screenshot

Getting Started

Install the Sitemap Urls command line tool:

npm install -g sitemap-urls
# or
yarn add -g sitemap-urls

Run sitemap-urls on a file containing a sitemap:

sitemap-urls sitemap.xml

Also supports piping:

curl http://example.com/sitemap.xml | sitemap-urls

Usage

CLI

Usage: sitemap-urls <path> [<options>]

Path:
    Path to a file containing an XML sitemap.
    This parameter is ignored when the sitemap is being piped.

Options:
    -h, --help      Show this help text.
    -v, --version   Print sitemap-urls' version.

API

.extractUrls(string xml) -> array

Extracts URLs from a string containing an XML sitemap.

Example result:

[
    "http://example.com/",
    "http://example.com/test/"
]

Related

  • medic - Perform bulk URL status checks and track changes.

License

Sitemap Urls is released under the MIT license.

Copyright © 2015 Roland Warmerdam.

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free