上传者: 38516190
|
上传时间: 2022-05-10 23:28:55
|
文件大小: 23KB
|
文件类型: PDF
Python疫情数据下载,并保存成Excel
import requests
import json
import os
import openpyxl
res = requests.get(url)
# 模拟浏览器请求
headers = {
'user-agent': 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01'
}
def get_data(provinceName):
data_url = "https://api