Skip to content

Commit 5fed5e6

Browse files
committed
fix: technical specs matchers
1 parent 4ceca2b commit 5fed5e6

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

src/HtmlPieces.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,10 @@ public function get(object $page, string $element, string $url='')
306306

307307
case "technical_specs":
308308
$technical_specs = [];
309+
310+
// Old ui
309311
$table = $dom->find($page, '.dataTable tr');
310-
if ($this->count($table) > 0) {
312+
if ($this->count($table) > 0) {
311313
foreach ($table as $row)
312314
{
313315
$row_title = $row->find('td')[0]->text(true);
@@ -319,6 +321,31 @@ public function get(object $page, string $element, string $url='')
319321
array_push($technical_specs, $row);
320322
}
321323
}
324+
325+
// New ui
326+
foreach ([
327+
'runtime',
328+
'soundmixes',
329+
'colorations',
330+
'aspectratio',
331+
'cameras',
332+
'laboratory',
333+
'filmLength',
334+
'negativeFormat',
335+
'process',
336+
'printedFormat'
337+
] as $itemId)
338+
{
339+
$row = $dom->find($page, "#$itemId");
340+
$row_title = $row->find(".ipc-metadata-list-item__label")->text(true);
341+
$row_value = $row->find('.ipc-metadata-list-item__content-container')->text(true);
342+
$row = [
343+
$this->strClean($row_title),
344+
$this->strClean($row_value)
345+
];
346+
array_push($technical_specs, $row);
347+
}
348+
322349
return $technical_specs;
323350
break;
324351

0 commit comments

Comments
 (0)