Skip to content

Commit 85067b4

Browse files
authored
Exclude anchor and query strung from URLs in sitemap connector (#86)
1 parent 680be49 commit 85067b4

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nuclia-sync-agent-app",
3-
"version": "1.6.0",
3+
"version": "1.6.1",
44
"description": "This is a Nuclia Sync Agent App",
55
"main": "build/index.js",
66
"scripts": {

server/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.6.1 (2025-02-14)
2+
3+
- Exclude anchor and query strung from URLs in sitemap connector
4+
15
# 1.6.0 (2025-01-28)
26

37
- Support files download when using sitemap connector with local extraction

server/src/logic/connector/infrastructure/connectors/sitemap.connector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function parseSitemap(sitemapContent: string): Promise<SiteMapModel[]> {
2626
const $ = cheerio.load(sitemapContent, { xml: true });
2727

2828
$('url').each((_, element) => {
29-
const loc = $(element).find('loc').text();
29+
const loc = $(element).find('loc').text().split('?')[0].split('#')[0];
3030
const lastmod = $(element).find('lastmod').text();
3131
urls.push({ loc, lastmod });
3232
});

0 commit comments

Comments
 (0)