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,7 +334,13 @@ function recup_liens_int($html) {
continue; continue;
} }
if (!array_key_exists($m[3], $liens_int)) { if (!array_key_exists($m[3], $liens_int)) {
$liens_int[$m[3]] = $m[7]; // 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];
}
} }
} }
} }

View file

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