mp: add AFP in title iff author is AFP

This commit is contained in:
quenousimporte 2024-10-01 13:46:38 +02:00
parent 49950d948b
commit bac4ba584e
1 changed files with 756 additions and 751 deletions

View File

@ -53,6 +53,11 @@
$summary = $finder->query('//p[contains(@class, "news__heading__top__intro")]')->item(0)->textContent;
$category = trim($finder->query('//p[contains(@class,"news__heading__top__kicker")]')->item(0)->textContent);
if (trim($author) == 'Agence France-Presse')
{
$title = 'AFP - ' . $title;
}
// strip images
$toremove = $finder->query('//svg');
foreach ($toremove as $elt)