diff options
| author | kamtschatka <simon.schatka@gmx.at> | 2024-07-14 13:54:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-14 12:54:32 +0100 |
| commit | aa3dce09ff68c212ac1fad33adfbfaba96290a59 (patch) | |
| tree | 60456e01707bd9f719a3b8157c51336fec5f69d3 /apps/workers/crawlerWorker.ts | |
| parent | a2225648a2a03887b2c6dba157257bb3099d4ef8 (diff) | |
| download | karakeep-aa3dce09ff68c212ac1fad33adfbfaba96290a59.tar.zst | |
fix: monolith not embedding SVG files correctly. Fixes #289 (#306)
passing in the URL of the page to have the proper URL for resolving relative paths
Diffstat (limited to '')
| -rw-r--r-- | apps/workers/crawlerWorker.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/workers/crawlerWorker.ts b/apps/workers/crawlerWorker.ts index f2a51fc8..ddf61fc8 100644 --- a/apps/workers/crawlerWorker.ts +++ b/apps/workers/crawlerWorker.ts @@ -422,15 +422,12 @@ async function archiveWebpage( jobId: string, ) { logger.info(`[Crawler][${jobId}] Will attempt to archive page ...`); - const urlParsed = new URL(url); - const baseUrl = `${urlParsed.protocol}//${urlParsed.host}`; - const assetId = newAssetId(); const assetPath = `/tmp/${assetId}`; await execa({ input: html, - })`monolith - -Ije -t 5 -b ${baseUrl} -o ${assetPath}`; + })`monolith - -Ije -t 5 -b ${url} -o ${assetPath}`; await saveAssetFromFile({ userId, @@ -442,7 +439,7 @@ async function archiveWebpage( }); logger.info( - `[Crawler][${jobId}] Done archiving the page as assertId: ${assetId}`, + `[Crawler][${jobId}] Done archiving the page as assetId: ${assetId}`, ); return assetId; |
