diff --git a/src/ids.js b/src/ids.js index 73bf09e9..064103a2 100644 --- a/src/ids.js +++ b/src/ids.js @@ -35,6 +35,11 @@ for await (const domain of domains.readLines()) { } for await (const line of urls.readLines()) { + if (!URL.canParse(`http://${line}`)) { + console.error(`Invalid URL: ${line}`) + continue + } + const url = new URL(`http://${line}`) const { hostname, pathname, search } = url const pathEscape = pathname.replaceAll(';', '\\;') + search