-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessTechnical.php
More file actions
27 lines (22 loc) · 1.78 KB
/
ProcessTechnical.php
File metadata and controls
27 lines (22 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
namespace MovieParser\IMDB\Matcher;
class ProcessTechnical
{
public function process(string $response) : array
{
$match = \Atrox\Matcher::single([
'id' => \Atrox\Matcher::single('//meta[@property="pageId"]/@content'),
'runtime' => \Atrox\Matcher::single('//table[@class="dataTable labelValueTable"]/tbody/tr/td[contains(text(), "Runtime")]/following-sibling::td/text()'),
'color' => \Atrox\Matcher::single('//table[@class="dataTable labelValueTable"]/tbody/tr/td[contains(text(), "Color")]/following-sibling::td/a/text()'),
'ratio' => \Atrox\Matcher::multi('//table[@class="dataTable labelValueTable"]/tbody/tr/td[contains(text(), "Aspect Ratio")]/following-sibling::td/text()'),
'camera' => \Atrox\Matcher::multi('//table[@class="dataTable labelValueTable"]/tbody/tr/td[contains(text(), "Camera")]/following-sibling::td/text()'),
'laboratory' => \Atrox\Matcher::multi('//table[@class="dataTable labelValueTable"]/tbody/tr/td[contains(text(), "Laboratory")]/following-sibling::td/text()'),
'filmLength' => \Atrox\Matcher::single('//table[@class="dataTable labelValueTable"]/tbody/tr/td[contains(text(), "Film Length")]/following-sibling::td/text()'),
'negativeFormat' => \Atrox\Matcher::single('//table[@class="dataTable labelValueTable"]/tbody/tr/td[contains(text(), "Negative Format")]/following-sibling::td/text()'),
'cineProcess' => \Atrox\Matcher::multi('//table[@class="dataTable labelValueTable"]/tbody/tr/td[contains(text(), "Cinematographic Process")]/following-sibling::td/text()'),
'printed' => \Atrox\Matcher::multi('//table[@class="dataTable labelValueTable"]/tbody/tr/td[contains(text(), "Printed Film Format")]/following-sibling::td/text()'),
])
->fromHtml();
return $match($response);
}
}