From 4b2424ae17c18a48c1d895009c0d4a4e16098f22 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Thu, 5 Sep 2024 14:07:27 +0200 Subject: [PATCH] todos and comments --- epub.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/epub.php b/epub.php index 6141bba..7dbdac6 100644 --- a/epub.php +++ b/epub.php @@ -14,6 +14,7 @@ function get_clean_html($node) { + // todo check words with "-" (like "sous-traitance") $innerHTM = ''; foreach ($node->childNodes as $childNode){ $nodeHTML = $childNode->ownerDocument->saveHTML($childNode); @@ -74,6 +75,7 @@ // articles accès libre $nodes = $finder->query('//div[contains(@class, "news__body__center__article")]'); } + // todo add "boite noire" if (!$nodes->length) { @@ -410,13 +412,11 @@ $opts = [ 'http' => [ 'method' => "GET", - //'header' => "Accept-language: en\nCookie: MPSESSID=" . $mp_sessionid, // todo + //'header' => "Accept-language: en\nCookie: MPSESSID=" . $mp_sessionid, // todo? ] ]; $context = stream_context_create($opts); - // todo add cover! - $epub = new TPEpubCreator(); $epub->temp_folder = 'temp/'; $epub->epub_file = 'epub/politis' . $issuenb . '.epub'; @@ -427,7 +427,6 @@ $xml = new SimpleXMLElement($feed); $items = $xml->xpath("/rss/channel/item"); - // reverse to respect timing foreach (array_reverse($items) as $item) { $url = $item->link; @@ -497,7 +496,7 @@ write_epub($epub); } - // New York Times + // New York Times RSS if (isset($_POST['nyt']) && $_POST['nyt']) { $feedurl = 'https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml';