Compare commits

..

No commits in common. "3e9dae252674bece7efa9782fdfa765022d9fdb2" and "f5cc7bdb8605e8b171170083ffc942095bfa2561" have entirely different histories.

1 changed files with 17 additions and 14 deletions

View File

@ -17,13 +17,8 @@
$innerHTM = '';
foreach ($node->childNodes as $childNode){
$nodeHTML = $childNode->ownerDocument->saveHTML($childNode);
$nodeHTML = str_replace('<aside', '<b><i', $nodeHTML);
$nodeHTML = str_replace('</aside', '</i></b', $nodeHTML);
$nodeHTML = str_replace('<blockquote', '<b><i', $nodeHTML);
$nodeHTML = str_replace('</blockquote', '</i></b', $nodeHTML);
$innerHTML .= $nodeHTML;
}
return '<div>' . strip_tags($innerHTML, '<p><b><h2><i><strong>') . '</div>';
@ -190,7 +185,7 @@
// Cafeyn
if (isset($_POST['cafeyn']) && $_POST['cafeyn'])
{
$url = $_POST['cafeyn'];
$url = $_POST['cafeynurl'];
// extract url from curl command
if (str_starts_with($url, 'curl '))
@ -289,7 +284,7 @@
// Le Monde
if (isset($_POST['lemonde']) && $_POST['lemonde'])
{
$url = $_POST['lemonde'];
$url = $_POST['lmurl'];
// extract url from curl command
if (str_starts_with($url, 'curl '))
@ -405,7 +400,11 @@
// Politis RSS
if (isset($_POST['politis']) && $_POST['politis'])
{
$issuenb = $_POST['politis'];
$issuenb = '';
if (isset($_POST['politisnb']))
{
$issuenb = $_POST['politisnb'];
}
$feedurl = 'https://www.politis.fr/flux-rss-politis-fr/';
$opts = [
'http' => [
@ -433,7 +432,7 @@
$url = $item->link;
$article = file_get_contents($url, false, $context);
if (!str_contains($article, ' dans lhebdo N° ' . $issuenb))
if ($issuenb && !str_contains($article, ' dans lhebdo N° ' . $issuenb))
{
continue;
}
@ -641,12 +640,14 @@
<label for="mptoday">Today only</label>
<h2>Le Monde</h2>
<label for="lemonde">"GetPublicationContentItems" json url: </label>
<input id="lemonde" name="lemonde">
<input id="lemonde" name="lemonde" type="checkbox">
<label for="lemonde">From "GetPublicationContentItems" json url: </label>
<input name="lmurl">
<h2>Cafeyn</h2>
<label for="cafeyn">"material" json url: </label>
<input id="cafeyn" name="cafeyn">
<input id="cafeyn" name="cafeyn" type="checkbox">
<label for="cafeyn">From "material" json url: </label>
<input name="cafeynurl">
<h2>The New York Times</h2>
<input id="nyt" name="nyt" type="checkbox">
@ -656,7 +657,9 @@
<label for="nyttoday">From today's paper embedded script</label>
<h2>Politis</h2>
<label for="politis">Issue number: </label><input id="politis" name="politis">
<input id="politis" name="politis" type="checkbox">
<label for="politis">From RSS.</label>
<label for="politisnb">Optional issue number: </label><input id="politisnb" name="politisnb">
<h2>Admin</h2>
<input id="emptycache" name="emptycache" type="checkbox" checked>