1 回答

TA贡献1911条经验 获得超7个赞
您的网址有拼写错误:
而不是域是githubuserxxxent.com,他们应该是githubusercontent.com。
请注意,尝试在浏览器中访问它时githubuserxxxent.com会返回错误。Address not found
也许您在代码中进行了查找和替换,这就是发生这种情况的原因。
固定代码:
import urllib.request
url = "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_recovered_global.csv"
urllib.request.urlretrieve(url, filename="time_series_covid19_recoveredGlobal.csv")
url = "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv"
urllib.request.urlretrieve(url, filename="time_series_covid19_confirmed_global.csv")
url = "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv"
urllib.request.urlretrieve(url, filename="time_series_covid19_deaths_global.csv")
添加回答
举报