Feat: ajout des title des liens internes lorsqu'ils existent
This commit is contained in:
parent
6a1c7d507f
commit
fc4035b8df
2 changed files with 8 additions and 1 deletions
|
@ -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];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue