Skip to content

Commit bd6640d

Browse files
committed
fix: technical specs matchers
1 parent 1379148 commit bd6640d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/HtmlPieces.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ public function get(object $page, string $element, string $url='')
337337
] as $itemId)
338338
{
339339
$row = $dom->find($page, "#$itemId");
340-
$row_title = $row->find(".ipc-metadata-list-item__label")->text(true);
340+
$row_title = $row->find(".ipc-metadata-list-item__label");
341+
if ($this->count($row_title) < 1) continue;
341342
$row_value_container = $row->find('.ipc-metadata-list-item__content-container');
342343
$row_value_list = $row_value_container->find('li');
343344
$row_value = '';
@@ -358,7 +359,7 @@ public function get(object $page, string $element, string $url='')
358359
$row_value = $row_value_container->text(true);
359360
}
360361
$row = [
361-
$this->strClean($row_title),
362+
$this->strClean($row_title->text(true)),
362363
$this->strClean($row_value)
363364
];
364365
array_push($technical_specs, $row);

0 commit comments

Comments
 (0)