Compare commits
2 Commits
0b3c66b99b
...
c6f604c28b
Author | SHA1 | Date |
---|---|---|
quenousimporte | c6f604c28b | |
quenousimporte | 4b4179cf8a |
26
epub.php
26
epub.php
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue