From 3e9dae252674bece7efa9782fdfa765022d9fdb2 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Wed, 4 Sep 2024 18:20:11 +0200 Subject: [PATCH] simplify params --- epub.php | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/epub.php b/epub.php index 42717d7..b192006 100644 --- a/epub.php +++ b/epub.php @@ -190,7 +190,7 @@ // Cafeyn if (isset($_POST['cafeyn']) && $_POST['cafeyn']) { - $url = $_POST['cafeynurl']; + $url = $_POST['cafeyn']; // extract url from curl command if (str_starts_with($url, 'curl ')) @@ -289,7 +289,7 @@ // Le Monde if (isset($_POST['lemonde']) && $_POST['lemonde']) { - $url = $_POST['lmurl']; + $url = $_POST['lemonde']; // extract url from curl command if (str_starts_with($url, 'curl ')) @@ -405,11 +405,7 @@ // Politis RSS if (isset($_POST['politis']) && $_POST['politis']) { - $issuenb = ''; - if (isset($_POST['politisnb'])) - { - $issuenb = $_POST['politisnb']; - } + $issuenb = $_POST['politis']; $feedurl = 'https://www.politis.fr/flux-rss-politis-fr/'; $opts = [ 'http' => [ @@ -437,7 +433,7 @@ $url = $item->link; $article = file_get_contents($url, false, $context); - if ($issuenb && !str_contains($article, ' dans l’hebdo N° ' . $issuenb)) + if (!str_contains($article, ' dans l’hebdo N° ' . $issuenb)) { continue; } @@ -645,14 +641,12 @@

Le Monde

- - - + +

Cafeyn

- - - + +

The New York Times

@@ -662,9 +656,7 @@

Politis

- - - +

Admin