Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
Country names like United States breaks fetch.py (#9)
Browse files Browse the repository at this point in the history
* Country names like United States breaks fetch.py

Issue #8

* Update display.py
  • Loading branch information
julianbruegger authored Mar 26, 2020
1 parent c3de30f commit 2e75fc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions display.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -100,4 +100,4 @@
lcd.message('Infected Today in' +cc)
lcd.message('\n' + today_c)

time.sleep(Waiting)
time.sleep(Waiting)
6 changes: 2 additions & 4 deletions fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -43,5 +43,3 @@
print (percent_c + (" of ")+(first)+ (" citicens are infected!"))
print (percent_w + (" of world citicens are infected!"))
#print ()


0 comments on commit 2e75fc9

Please sign in to comment.