add politis cover
This commit is contained in:
parent
9a52832348
commit
ee0f2fe47c
8
epub.php
8
epub.php
|
@ -422,6 +422,14 @@
|
|||
$epub->epub_file = 'epub/politis' . $issuenb . '.epub';
|
||||
$epub->title = 'Politis ' . $issuenb . ' - RSS ' . $today;
|
||||
|
||||
// find cover
|
||||
$issues = file_get_contents('https://www.politis.fr/boutique/magazines-unite/');
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHTML($issues);
|
||||
$finder = new DomXPath($doc);
|
||||
$cover = $finder->query('//img[contains(@src, "' . $issuenb . '_")]')->item(0)->getAttribute('src');
|
||||
$epub->AddImage($cover, 'image/jpeg', true);
|
||||
|
||||
// load feeds
|
||||
$feed = file_get_contents($feedurl);
|
||||
$xml = new SimpleXMLElement($feed);
|
||||
|
|
Loading…
Reference in New Issue