https://github.com/brunos3d/sitemap-links-ts
📦 NODE.TS - Crawl and parse links in sitemap recursively.
https://github.com/brunos3d/sitemap-links-ts
crawl fetch parse sitemap typescript
Last synced: 4 months ago
JSON representation
📦 NODE.TS - Crawl and parse links in sitemap recursively.
- Host: GitHub
- URL: https://github.com/brunos3d/sitemap-links-ts
- Owner: brunos3d
- License: mit
- Created: 2021-12-17T09:56:33.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-17T11:12:09.000Z (almost 4 years ago)
- Last Synced: 2025-05-27T15:54:45.527Z (4 months ago)
- Topics: crawl, fetch, parse, sitemap, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/sitemap-links-ts
- Size: 18.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sitemap Links TypeScript
📦 NODE.TS - Crawl and parse links in sitemap recursively.
## Disclaimer
> âš NOTICE: This project was initially created by https://github.com/gijo-varghese
I restored using the [NPM registry](https://www.npmjs.com/package/sitemap-links), I don't use the version that is in npm because it doesn't support TypeScript. I couldn't propose any kind of change, because the [original project](https://github.com/gijo-varghese/sitemap-links) was removed for some reason from GitHub, the original license was ISC, but if you are the author and want to remove this project, just [contact me](mailto:bruno3dcontato@gmail.com) by email.
## Installation
```bash
npm install sitemap-links-ts
``````bash
yarn add sitemap-links-ts
```## Import
```javascript
const getSitemapLinks = require('sitemap-links-ts');
``````javascript
import getSitemapLinks from 'sitemap-links-ts';
```## Usage
```javascript
const getSitemapLinks = require('sitemap-links-ts');getSitemapLinks('https://example.com/sitemap_index.xml')
.then((urls) => console.log(urls))
.catch((e) => console.log(e));
```### With timeout (default 60s)
```javascript
const getSitemapLinks = require('sitemap-links-ts');// 10s timeout
getSitemapLinks('https://example.com/sitemap_index.xml', 10000)
.then((urls) => console.log(urls))
.catch((e) => console.log(e));
```