Feature/improve detection of json used via scraper configuration (#3539)
* Improve detection of json * Update changelog
This commit is contained in:
parent
194aee97db
commit
8227a2d91a
@ -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/),
|
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).
|
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
|
## 2.92.0 - 2024-06-30
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -257,7 +257,7 @@ export class ManualService implements DataProviderInterface {
|
|||||||
signal: abortController.signal
|
signal: abortController.signal
|
||||||
});
|
});
|
||||||
|
|
||||||
if (headers['content-type'] === 'application/json') {
|
if (headers['content-type'].includes('application/json')) {
|
||||||
const data = JSON.parse(body);
|
const data = JSON.parse(body);
|
||||||
const value = String(
|
const value = String(
|
||||||
jsonpath.query(data, scraperConfiguration.selector)[0]
|
jsonpath.query(data, scraperConfiguration.selector)[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user