1. 首页
  2. 数据库
  3. 其它
  4. Python爬虫 — 武汉市近年来空气质量数据

Python爬虫 — 武汉市近年来空气质量数据

上传者: 2020-12-23 02:09:56上传 PDF文件 208.93KB 热度 19次
本次是通过Python爬虫来获取武汉市近年来空气质量数据 我使用的网站是:http://www.tianqihoubao.com 1. 开始 首先导入所需要的库 import time, requests import pandas as pd from lxml import etree 接下来就是爬虫的代码了 url = 'http://www.tianqihoubao.com/aqi/wuhan.html' #找到关于武汉的页面 headers = { 'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1)
下载地址
用户评论