Compare commits

...

2 Commits

Author SHA1 Message Date
quenousimporte c6f604c28b fix missing article header 2024-08-28 16:55:33 +02:00
quenousimporte 4b4179cf8a remove dead code 2024-08-28 16:55:19 +02:00
1 changed files with 6 additions and 20 deletions

View File

@ -78,7 +78,8 @@
{
$node = $nodes->item(0);
$nodehtml = get_clean_html($node);
$epub->AddPage($nodehtml, false, $title);
$result .= $nodehtml;
$epub->AddPage($result, false, $title);
}
}
@ -463,23 +464,6 @@
$doc->loadHTML($article);
$finder = new DomXPath($doc);
// strip images
/*$toremove = $finder->query('//svg');
foreach ($toremove as $elt)
{
$elt->parentNode->removeChild($elt);
}
$toremove = $finder->query('//figure');
foreach ($toremove as $elt)
{
$elt->parentNode->removeChild($elt);
}
$toremove = $finder->query('//span[@class="screen-reader-only"]');
foreach ($toremove as $elt)
{
$elt->parentNode->removeChild($elt);
}*/
$result = '<h1>' . $title . '</h1>';
$result .= '<p>' . $author . '</p>';
$result .= '<p>' . $item->pubDate . '</p>';
@ -495,7 +479,8 @@
{
$node = $nodes->item(0);
$nodehtml = get_clean_html($node);
$epub->AddPage($nodehtml, false, $title);
$result .= $nodehtml;
$epub->AddPage($result, false, $title);
}
}
@ -563,7 +548,8 @@
{
$node = $nodes->item(0);
$nodehtml = get_clean_html($node);
$epub->AddPage($nodehtml, false, $title);
$result .= $nodehtml;
$epub->AddPage($result, false, $title);
}
}
}