TibiaData / tibiadata-api-go

TibiaData API written in Golang and deployed in container (version v3 and above).
https://api.tibiadata.com
MIT License
81 stars 28 forks source link

A killer having "and" in the character name who is also traded gets parsed incorrectly #318

Closed MichalNawrocik closed 7 months ago

MichalNawrocik commented 7 months ago

Character Mieluffy Jan 12 2024, 20:38:09 CET Eliminated at Level 508 by [Shantty], [Sin Primalbazzar], [Supperiore], [Righo], [Beltran Tzawayak], [Ilysz Sin Tales], [Flaco El Pobre], [Pecaas], [Knightsitaz], [Dhanielz Acorazado], [Jobi], [Aeronabic], [Side Effectss], [Ekizdd], [Baby Mikoh], [Sneki], Love and Death (traded) and [Next Generation]. Assisted by [Swiifti] and [Duende blanco].

It gets parsed to:

{
  "name": "Love",
  "player": false,
  "traded": false,
  "summon": ""
},
{
  "name": "Death",
  "player": true,
  "traded": true,
  "summon": ""
}

So the character's name "Love and Death" is wrongfully split into two parts, with the first part being mistaken for the creature's name. A fix should be simple: a creature can only appear last in the killers list. So even if the traded character appears last, then what is before "and" and without a hyperlink is part of his name anyway, not a creature name. I would write a fix but I don't know Golang (yet?)

tobiasehlert commented 7 months ago

thanks for the report @MichalNawrocik, we'll look into this :)

tobiasehlert commented 7 months ago

created branch bug-318-killer-with-and-in-name-parsing-incorrect with test and testdata