Skip to content

jcabak/Sitemap.xml-URL-Extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Sitemap.xml URL Extractor

This Node.js script extracts URLs from one or more sitemap.xml files and appends them to a text file.

Requirements

  • Node.js v10 or higher
  • The following Node.js modules:
    • fs
    • https
    • xml2js

Installation

Clone this repository to your local machine:

git clone https://github.com/your-username/sitemap-url-extractor.git

Navigate to the project directory:

cd sitemap-url-extractor

Install the required Node.js modules:

npm install

Usage

Open the index.js file in a text editor.

Modify the sitemapUrls array to include the URLs of the sitemap.xml files you want to extract URLs from OR you could load sitemap.xml urls from sitemaps.txt file.

Save the changes to the index.js file.

Run the script using Node.js:

node index.js

The script will fetch each sitemap.xml file, extract the URLs, and append them to a file called urls.txt in the project directory.

About

Node.js script extracts URLs from one or more sitemap.xml files and appends them to a text file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published