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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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)