Compare commits
No commits in common. "c6f604c28b9fac6f2b74e3f15fadeae933c88f35" and "0b3c66b99b2c2865c83344bb49b3ce1bd7672758" have entirely different histories.
c6f604c28b
...
0b3c66b99b
26
epub.php
26
epub.php
|
@ -78,8 +78,7 @@
|
|||
{
|
||||
$node = $nodes->item(0);
|
||||
$nodehtml = get_clean_html($node);
|
||||
$result .= $nodehtml;
|
||||
$epub->AddPage($result, false, $title);
|
||||
$epub->AddPage($nodehtml, false, $title);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -464,6 +463,23 @@
|
|||
$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>';
|
||||
|
@ -479,8 +495,7 @@
|
|||
{
|
||||
$node = $nodes->item(0);
|
||||
$nodehtml = get_clean_html($node);
|
||||
$result .= $nodehtml;
|
||||
$epub->AddPage($result, false, $title);
|
||||
$epub->AddPage($nodehtml, false, $title);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -548,8 +563,7 @@
|
|||
{
|
||||
$node = $nodes->item(0);
|
||||
$nodehtml = get_clean_html($node);
|
||||
$result .= $nodehtml;
|
||||
$epub->AddPage($result, false, $title);
|
||||
$epub->AddPage($nodehtml, false, $title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue