Skip to content
This repository was archived by the owner on Apr 29, 2026. It is now read-only.

Latest commit

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

TestURLs - NodeJS based CLI utility

A NodeJS based CLI utility to parse a CSV file and test URLs whether they're valid links that return a valid server response

Requirements

NodeJS v12.10.x (May work in older versions as well)

Installation

Within the TestURLs directory:

$ npm install

CLI Arguments

#DescriptionExpected TypeDefaultRequired
1The Path to the CSV that contains the URLs you want to teststring''true
2The column name within the CSV that contains your URLsstringurlfalse
3A JavaScript based Regular Expression to be used on each URLstring''false
4Text that will be used to replace if found by the RegExstring''false
5The Maximum amount of simultaneous URL requests/tests made at a timenumber5false
6The Amount of Milliseconds to wait in between Requests if the maximum has been reachednumber1000false

Usage

In order to run the script, you must first use the node CLI followed by the path to this CLI utility script followed by your arguments.

Use the arguments table above to learn what each argument does.

Example:

$ node ./testURLs/ ./MyURLs.csv WebsiteURL www dev 5 2000

RegEx Example:

$ node ./testURLs/ ./MyURLs.csv WebsiteURL 'www\..+\.\w+/?' sub.domain.com/ 5 2000

This example will replace all website domains to instead request a particular domain / sub-domain.

https://www.google.ca -> https://sub.domain.com/
https://www.github.com/jwmann/ -> https://sub.domain.com/jwmann/

Output

If the script ran successfully and there are any URLs that were problematic, a CSV file will be outputted to the directory that you run the CLI utility from.

$ pwd
/Users/me/Desktop
$ node ./testURLs/ ./MyURLs.csv
/Users/me/Desktop/urls.csv

If there are no problematic URLs, then the script will exit successfully and no file will be generated.

About

A NodeJS based CLI utility to parse a CSV file and test URLs whether they're valid links that return a valid server response

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages