remove useless code
This commit is contained in:
parent
f76a12e7a5
commit
a9308fe161
17
epub.php
17
epub.php
|
@ -41,23 +41,6 @@
|
||||||
$date = trim($finder->query('//time')->item(1)->textContent);
|
$date = trim($finder->query('//time')->item(1)->textContent);
|
||||||
$summary = $finder->query('//p[contains(@class, "news__heading__top__intro")]')->item(0)->textContent;
|
$summary = $finder->query('//p[contains(@class, "news__heading__top__intro")]')->item(0)->textContent;
|
||||||
|
|
||||||
// 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 = '<h1>' . $title . '</h1>';
|
||||||
$result .= '<p>' . $author . '</p>';
|
$result .= '<p>' . $author . '</p>';
|
||||||
$result .= '<p>' . $date . '</p>';
|
$result .= '<p>' . $date . '</p>';
|
||||||
|
|
Loading…
Reference in New Issue