想从网站上爬点气象数据,按照以下代码试了好几天,也换了好几种,都不能得到自己想要的内容
是我的代码有问题吗,还是其他问题?
import requests

import bs4
headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"}
response=requests.get("http://weather.sz.gov.cn/",headers=headers)
soup=bs4.BeautifulSoup(response.text,"lxml")
soup.encode('utf-8')
forecast_list=soup.find_all(id='yb_day')
print(forecast_list)
for forecast in forecast_list:
print(forecast)