architv / soccer-cli

:soccer: Football scores for hackers. :computer: A command line interface for all the football scores.
MIT License
1.09k stars 222 forks source link

Team name contains named HTML entity instead of unicode representation #24

Closed Saturn closed 8 years ago

Saturn commented 8 years ago

I am guessing it is because this team was just promoted last season. But for some reason the team name from the API is given as União Madeira instead of Uni\u00e3o Madeira or equivalent.

It doesn't print very nicely :smile:

União Madeira    0    vs   0     Vitoria Guimaraes   

It could be fixed with something like:

>>> from HTMLParser import HTMLParser
>>> h = HTMLParser()
>>> team = 'União Madeira'
>>> print team
União Madeira
>>> print h.unescape(team)
União Madeira

But don't think that is necessary since it is the only team name that contains a named HTML entity so I assume it is an error.

I have emailed the site owner about this issue.

Saturn commented 8 years ago

This has been fixed now :+1: