diff --git a/display.py b/display.py index 544e2eb..5ba18ed 100644 --- a/display.py +++ b/display.py @@ -55,7 +55,7 @@ survived_c = soup_c.select('h2')[3].text.strip() today_c = soup_c.select('h2')[4].text.strip() - first, last = country.split() + first = country.rsplit(' ',1)[0] infections_w = soup_w.select('h2')[1].text.strip() deaths_w = soup_w.select('h2')[2].text.strip() @@ -100,4 +100,4 @@ lcd.message('Infected Today in' +cc) lcd.message('\n' + today_c) - time.sleep(Waiting) \ No newline at end of file + time.sleep(Waiting) diff --git a/fetch.py b/fetch.py index 8dc5d64..9789a49 100644 --- a/fetch.py +++ b/fetch.py @@ -24,8 +24,8 @@ survived_c = soup_c.select('h2')[3].text.strip() today_c = soup_c.select('h2')[4].text.strip() -first, last = country.split() - +first = country.rsplit(' ',1)[0] + infections_w = soup_w.select('h2')[1].text.strip() deaths_w = soup_w.select('h2')[2].text.strip() survived_w = soup_w.select('h2')[3].text.strip() @@ -43,5 +43,3 @@ print (percent_c + (" of ")+(first)+ (" citicens are infected!")) print (percent_w + (" of world citicens are infected!")) #print () - -