Skip to content

Commit

Permalink
fix: use window.location.origin instead of base url
Browse files Browse the repository at this point in the history
  • Loading branch information
amhsirak committed Dec 5, 2024
1 parent 5ed8e8a commit 5985bc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maxun-core/src/browserSide/scraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function scrapableHeuristics(maxCountPerPage = 50, minArea = 20000, scrolls = 3,
} else if (attribute === 'href') {
// Handle relative 'href' URLs
const href = fieldElement.getAttribute('href');
record[label] = href ? new URL(href, baseUrl).href : null;
record[label] = href ? new URL(href, window.location.origin).href : null;
} else {
record[label] = fieldElement.getAttribute(attribute);
}
Expand Down

0 comments on commit 5985bc1

Please sign in to comment.