add mp boite noire

This commit is contained in:
quenousimporte 2024-09-05 17:48:36 +02:00
parent ee0f2fe47c
commit 377fc1aa6a
1 changed files with 9 additions and 1 deletions

View File

@ -75,7 +75,6 @@
// articles accès libre // articles accès libre
$nodes = $finder->query('//div[contains(@class, "news__body__center__article")]'); $nodes = $finder->query('//div[contains(@class, "news__body__center__article")]');
} }
// todo add "boite noire"
if (!$nodes->length) if (!$nodes->length)
{ {
@ -86,6 +85,15 @@
$node = $nodes->item(0); $node = $nodes->item(0);
$nodehtml = get_clean_html($node); $nodehtml = get_clean_html($node);
$result .= $nodehtml; $result .= $nodehtml;
// add boite noire
$nodes = $finder->query('//aside[contains(@class, "_black")]');
if ($nodes->length)
{
$node = $nodes->item(0);
$nodehtml = get_clean_html($node);
$result .= '<div>' . $nodehtml . '</div>';
}
$epub->AddPage($result, false, $title); $epub->AddPage($result, false, $title);
} }
} }