This commit is contained in:
Damien Broqua 2022-06-27 14:47:19 +02:00
parent 5d6fa2c909
commit 6de5e087df

View file

@ -141,10 +141,14 @@ const getStationName = (start, callback) => {
} else { } else {
const html = htmlparser(body); const html = htmlparser(body);
const name = html const name = html
.querySelector("strong")? .querySelector("strong");
if ( name ) {
name = name
.toString()? .toString()?
.replace(/[<>/]/g, "")? .replace(/[<>/]/g, "")?
.replace(/strong/g, "") || null; .replace(/strong/g, "") || null;
}
if (name) { if (name) {
item.name = name; item.name = name;