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]
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]