Skip to content

Instantly share code, notes, and snippets.

Last active June 17, 2022 10:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Save sitemap links from two URLs into separate files.
const getLinks = require('sitemap-links');
fs = require('fs');
(async () => {
const newSitemapLink = '';
const oldSitemapLink = '';
const newLinks = await getLinks(newSitemapLink);
const oldLinks = await getLinks(oldSitemapLink);
fs.writeFile('', newLinks.join('\n'), function (err) {
console.log('Extract saved successful');
fs.writeFile('', oldLinks.join('\n'), function (err) {
console.log('Extract saved successful');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment