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 236f3ed commit 5ed8e8a
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 @@ -285,7 +285,7 @@ function scrapableHeuristics(maxCountPerPage = 50, minArea = 20000, scrolls = 3,
} else if (attribute === 'src') {
// Handle relative 'src' URLs
const src = fieldElement.getAttribute('src');
record[label] = src ? new URL(src, baseUrl).href : null;
record[label] = src ? new URL(src, window.location.origin).href : null;
} else if (attribute === 'href') {
// Handle relative 'href' URLs
const href = fieldElement.getAttribute('href');
Expand Down

0 comments on commit 5ed8e8a

Please sign in to comment.