Now acepts states with spaces in the name
This commit is contained in:
parent
f981d1407a
commit
5741e080f3
@ -3,6 +3,7 @@ import pandas as pd
|
||||
import requests
|
||||
import os
|
||||
import discord
|
||||
import string
|
||||
|
||||
def get_csv():
|
||||
git_url = 'https://api.github.com/repos/CSSEGISandData/COVID-19/contents/csse_covid_19_data/csse_covid_19_daily_reports'
|
||||
@ -37,7 +38,7 @@ def sum_numbers(state):
|
||||
|
||||
def parse_message(message):
|
||||
try:
|
||||
state = message.split()[1].capitalize()
|
||||
state = string.capwords(' '.join(message.split()[1:]))
|
||||
except IndexError:
|
||||
state = 'California'
|
||||
return sum_numbers(state)
|
||||
return sum_numbers(state)
|
||||
|
Loading…
x
Reference in New Issue
Block a user