mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 19:58:53 +02:00
Use better parameter value parsing for pollin and reichelt parameters
This commit is contained in:
parent
8d9dde0032
commit
a9bd4c5606
2 changed files with 3 additions and 3 deletions
|
@ -184,9 +184,9 @@ class PollinProvider implements InfoProviderInterface
|
|||
|
||||
//Iterate over each tr.properties-row inside table.product-detail-properties-table
|
||||
$dom->filter('table.product-detail-properties-table tr.properties-row')->each(function (Crawler $node) use (&$parameters) {
|
||||
$parameters[] = ParameterDTO::parseValueField(
|
||||
$parameters[] = ParameterDTO::parseValueIncludingUnit(
|
||||
name: rtrim($node->filter('th.properties-label')->text(), ':'),
|
||||
value: $node->filter('td.properties-value')->text()
|
||||
value: trim($node->filter('td.properties-value')->text())
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ class ReicheltProvider implements InfoProviderInterface
|
|||
|
||||
//Iterate over each second li in ul.articleAttribute, which contains the specifications
|
||||
$groupElement->filter('ul.articleAttribute li:nth-child(2n)')->each(function (Crawler $specElement) use (&$parameters, $groupName) {
|
||||
$parameters[] = ParameterDTO::parseValueField(
|
||||
$parameters[] = ParameterDTO::parseValueIncludingUnit(
|
||||
name: $specElement->previousAll()->text(),
|
||||
value: $specElement->text(),
|
||||
group: $groupName
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue