Skip to content

Commit a879078

Browse files
authored
Merge pull request #225 from getmaxun/develop
chore: release v0.0.4
2 parents b3a973f + 6219837 commit a879078

File tree

20 files changed

+878
-279
lines changed

20 files changed

+878
-279
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ COPY vite.config.js ./
1616
COPY tsconfig.json ./
1717

1818
# Expose the frontend port
19-
EXPOSE 5173
19+
EXPOSE ${FRONTEND_PORT:-5173}
2020

2121
# Start the frontend using the client script
2222
CMD ["npm", "run", "client", "--", "--host"]

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ services:
4343
#build:
4444
#context: .
4545
#dockerfile: server/Dockerfile
46-
image: getmaxun/maxun-backend:v0.0.5
46+
image: getmaxun/maxun-backend:v0.0.6
4747
ports:
4848
- "${BACKEND_PORT:-8080}:${BACKEND_PORT:-8080}"
4949
env_file: .env
@@ -72,7 +72,7 @@ services:
7272
#build:
7373
#context: .
7474
#dockerfile: Dockerfile
75-
image: getmaxun/maxun-frontend:v0.0.2
75+
image: getmaxun/maxun-frontend:v0.0.3
7676
ports:
7777
- "${FRONTEND_PORT:-5173}:${FRONTEND_PORT:-5173}"
7878
env_file: .env

maxun-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maxun-core",
3-
"version": "0.0.4",
3+
"version": "0.0.6",
44
"description": "Core package for Maxun, responsible for data extraction",
55
"main": "build/index.js",
66
"typings": "build/index.d.ts",

maxun-core/src/browserSide/scraper.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,13 @@ function scrapableHeuristics(maxCountPerPage = 50, minArea = 20000, scrolls = 3,
283283
} else if (attribute === 'innerHTML') {
284284
record[label] = fieldElement.innerHTML.trim();
285285
} else if (attribute === 'src') {
286-
// Handle relative 'src' URLs
287-
const src = fieldElement.getAttribute('src');
288-
record[label] = src ? new URL(src, baseUrl).href : null;
286+
// Handle relative 'src' URLs
287+
const src = fieldElement.getAttribute('src');
288+
record[label] = src ? new URL(src, window.location.origin).href : null;
289289
} else if (attribute === 'href') {
290290
// Handle relative 'href' URLs
291291
const href = fieldElement.getAttribute('href');
292-
record[label] = href ? new URL(href, baseUrl).href : null;
292+
record[label] = href ? new URL(href, window.location.origin).href : null;
293293
} else {
294294
record[label] = fieldElement.getAttribute(attribute);
295295
}
@@ -346,5 +346,5 @@ function scrapableHeuristics(maxCountPerPage = 50, minArea = 20000, scrolls = 3,
346346

347347
return results;
348348
};
349-
349+
350350
})(window);

0 commit comments

Comments
 (0)