simplify params
This commit is contained in:
parent
0f2449c3ca
commit
3e9dae2526
26
epub.php
26
epub.php
|
@ -190,7 +190,7 @@
|
||||||
// Cafeyn
|
// Cafeyn
|
||||||
if (isset($_POST['cafeyn']) && $_POST['cafeyn'])
|
if (isset($_POST['cafeyn']) && $_POST['cafeyn'])
|
||||||
{
|
{
|
||||||
$url = $_POST['cafeynurl'];
|
$url = $_POST['cafeyn'];
|
||||||
|
|
||||||
// extract url from curl command
|
// extract url from curl command
|
||||||
if (str_starts_with($url, 'curl '))
|
if (str_starts_with($url, 'curl '))
|
||||||
|
@ -289,7 +289,7 @@
|
||||||
// Le Monde
|
// Le Monde
|
||||||
if (isset($_POST['lemonde']) && $_POST['lemonde'])
|
if (isset($_POST['lemonde']) && $_POST['lemonde'])
|
||||||
{
|
{
|
||||||
$url = $_POST['lmurl'];
|
$url = $_POST['lemonde'];
|
||||||
|
|
||||||
// extract url from curl command
|
// extract url from curl command
|
||||||
if (str_starts_with($url, 'curl '))
|
if (str_starts_with($url, 'curl '))
|
||||||
|
@ -405,11 +405,7 @@
|
||||||
// Politis RSS
|
// Politis RSS
|
||||||
if (isset($_POST['politis']) && $_POST['politis'])
|
if (isset($_POST['politis']) && $_POST['politis'])
|
||||||
{
|
{
|
||||||
$issuenb = '';
|
$issuenb = $_POST['politis'];
|
||||||
if (isset($_POST['politisnb']))
|
|
||||||
{
|
|
||||||
$issuenb = $_POST['politisnb'];
|
|
||||||
}
|
|
||||||
$feedurl = 'https://www.politis.fr/flux-rss-politis-fr/';
|
$feedurl = 'https://www.politis.fr/flux-rss-politis-fr/';
|
||||||
$opts = [
|
$opts = [
|
||||||
'http' => [
|
'http' => [
|
||||||
|
@ -437,7 +433,7 @@
|
||||||
$url = $item->link;
|
$url = $item->link;
|
||||||
$article = file_get_contents($url, false, $context);
|
$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;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -645,14 +641,12 @@
|
||||||
<label for="mptoday">Today only</label>
|
<label for="mptoday">Today only</label>
|
||||||
|
|
||||||
<h2>Le Monde</h2>
|
<h2>Le Monde</h2>
|
||||||
<input id="lemonde" name="lemonde" type="checkbox">
|
<label for="lemonde">"GetPublicationContentItems" json url: </label>
|
||||||
<label for="lemonde">From "GetPublicationContentItems" json url: </label>
|
<input id="lemonde" name="lemonde">
|
||||||
<input name="lmurl">
|
|
||||||
|
|
||||||
<h2>Cafeyn</h2>
|
<h2>Cafeyn</h2>
|
||||||
<input id="cafeyn" name="cafeyn" type="checkbox">
|
<label for="cafeyn">"material" json url: </label>
|
||||||
<label for="cafeyn">From "material" json url: </label>
|
<input id="cafeyn" name="cafeyn">
|
||||||
<input name="cafeynurl">
|
|
||||||
|
|
||||||
<h2>The New York Times</h2>
|
<h2>The New York Times</h2>
|
||||||
<input id="nyt" name="nyt" type="checkbox">
|
<input id="nyt" name="nyt" type="checkbox">
|
||||||
|
@ -662,9 +656,7 @@
|
||||||
<label for="nyttoday">From today's paper embedded script</label>
|
<label for="nyttoday">From today's paper embedded script</label>
|
||||||
|
|
||||||
<h2>Politis</h2>
|
<h2>Politis</h2>
|
||||||
<input id="politis" name="politis" type="checkbox">
|
<label for="politis">Issue number: </label><input id="politis" name="politis">
|
||||||
<label for="politis">From RSS.</label>
|
|
||||||
<label for="politisnb">Optional issue number: </label><input id="politisnb" name="politisnb">
|
|
||||||
|
|
||||||
<h2>Admin</h2>
|
<h2>Admin</h2>
|
||||||
<input id="emptycache" name="emptycache" type="checkbox" checked>
|
<input id="emptycache" name="emptycache" type="checkbox" checked>
|
||||||
|
|
Loading…
Reference in New Issue