FIX Web Crawler doesn't include search params in URLs (#2300)

This commit is contained in:
Ahmed Osman
2024-05-02 19:42:00 +02:00
committed by GitHub
parent c5e06bce6d
commit 2254d16c3a
+1 -1
View File
@@ -308,7 +308,7 @@ function getURLsFromHTML(htmlBody: string, baseURL: string): string[] {
*/
function normalizeURL(urlString: string): string {
const urlObj = new URL(urlString)
const hostPath = urlObj.hostname + urlObj.pathname
const hostPath = urlObj.hostname + urlObj.pathname + urlObj.search
if (hostPath.length > 0 && hostPath.slice(-1) == '/') {
// handling trailing slash
return hostPath.slice(0, -1)