#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/11/18 13:02
# @Author : huni
# @File : 疫情数据分析.py
# @Software: PyCharm
import requests
import sqlite3
def getData(url):
headers = {
'Referer': 'https://news.qq.com/zt2020/page/feiyan.htm',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36'
}
data = {
'modules': 'chinaDayList, chinaDayAddList, cityStatis, nowConfirmStatis, provinceCompare'
}
#这里url请求是post数据
response = requests.post(url=url
python 爬虫 网站的历史数据的爬取案例 API请求历史数据
最新推荐文章于 2024-04-30 13:19:06 发布