julianbruegger / corona-display

Keep Track of the Corona-Numbers
GNU General Public License v3.0
46 stars 9 forks source link

Country names like United States breaks fetch.py #8

Closed Anstedt closed 4 years ago

Anstedt commented 4 years ago

If line 8 is changed to : url_c = "https://corona.help/country/us"

The following error occurs because the returned tuple is 'United' 'States' 'stats', 3 values. File "fetch.py", line 27, in first, last = country.split() ValueError: too many values to unpack (expected 2)

A simple fix is to change: first, last = country.split() TO: which removes the last word, 'stats' from the name. first = country.rsplit(' ',1)[0]

julianbruegger commented 4 years ago

You mean like metioned in the pul-request above (#9)?