3.5.1 • Published 3 years ago

@cityssm/get-site-urls v3.5.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

get-site-urls

npm (scoped) Codacy grade Code Climate maintainability Code Climate coverage AppVeyor Snyk Vulnerabilities for GitHub Repo

Get all of the URLs from a website.

Forked from alex-page/get-site-urls.

Install

npm install @cityssm/get-site-urls

Usage

import { 'getSiteUrls' } from "@cityssm/get-site-urls";

getSiteUrls( 'https://saultstemarie.ca' )
	.then( links => console.log( links ) );

( async () => {
	const links = await getSiteUrls( 'https://saultstemarie.ca' );
	console.log( links );

/*
{
	pages: [
		'https://saultstemarie.ca',
		'https://saultstemarie.ca/City-Hall.aspx',
		'https://saultstemarie.ca/City-Hall/City-Council.aspx',
		...,
		'https://saultstemarie.ca/Contact-Us.aspx',
		'https://saultstemarie.ca/Site-Map.aspx'
	],
	errors: [
		'https://saultstemarie.ca/Broken-Link.aspx'
	]
}
*/
})();

Parameters

The function getSiteUrls() takes two parameters:

getSiteUrls( url, maxDepth );
  1. url - The URL to search.
  2. maxDepth - The maximum depth to search, default 1.
3.5.1

3 years ago

3.5.0

3 years ago

3.4.1

3 years ago

3.4.0

3 years ago

3.3.1

3 years ago

3.3.0

4 years ago

3.1.2

4 years ago

3.2.0

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago