Feat: ajout des title des liens internes lorsqu'ils existent

This commit is contained in:
cy_altern 2023-05-29 20:46:49 +02:00
parent 6a1c7d507f
commit fc4035b8df
2 changed files with 8 additions and 1 deletions

View file

@ -334,10 +334,16 @@ function recup_liens_int($html) {
continue;
}
if (!array_key_exists($m[3], $liens_int)) {
// recup title si existe
preg_match('/title="([^"]*)/si', $m[4], $match2);
if ($match2 && $match2[1] !== '') {
$liens_int[$m[3]] = $m[7].' (title: '.$match2[1].')';
} else {
$liens_int[$m[3]] = $m[7];
}
}
}
}
$l_int = [];
if (count($liens_int)) {
foreach ($liens_int as $url => $titre) {

View file

@ -37,6 +37,7 @@
"keywords": "w200p",
"trackers": "w100p",
"rezos": "w100p",
"titres": "minw400p",
"liens_int": "w400p maxw400p",
"text": "minw400p"
}