Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/improve detection of json used via scraper configuration (#3539)

Chang-Yen Tseng8227a2d91adb
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a7dc7abd47..850d2a7a15 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## Unreleased
+
+### Changed
+
+- Improved the detection of REST APIs (`JSON`) used via the scraper configuration
+
## 2.92.0 - 2024-06-30
### Added
diff --git a/apps/api/src/services/data-provider/manual/manual.service.ts b/apps/api/src/services/data-provider/manual/manual.service.ts
index d2e5bca851..0655d2318c 100644
--- a/apps/api/src/services/data-provider/manual/manual.service.ts
+++ b/apps/api/src/services/data-provider/manual/manual.service.ts
@@ -257,7 +257,7 @@ export class ManualService implements DataProviderInterface {
signal: abortController.signal
});
- if (headers['content-type'] === 'application/json') {
+ if (headers['content-type'].includes('application/json')) {
const data = JSON.parse(body);
const value = String(
jsonpath.query(data, scraperConfiguration.selector)[0]