1 回答

TA貢獻(xiàn)1911條經(jīng)驗(yàn) 獲得超7個(gè)贊
您的網(wǎng)址有拼寫(xiě)錯(cuò)誤:
而不是域是githubuserxxxent.com,他們應(yīng)該是githubusercontent.com。
請(qǐng)注意,嘗試在瀏覽器中訪問(wèn)它時(shí)githubuserxxxent.com會(huì)返回錯(cuò)誤。Address not found
也許您在代碼中進(jìn)行了查找和替換,這就是發(fā)生這種情況的原因。
固定代碼:
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")
添加回答
舉報(bào)