我一直在尝试从航班网站上抓取数据。这是我写的代码:todays_date = str(date.today())arrival_filename = todays_date+"Arrival_Data_IGI.csv"res = requests.get("https://m.newdelhiairport.in/live-flight- information.aspx?FLMode=A&FLType=D")soup = BeautifulSoup(res.content,'lxml')table = soup.find_all('table',{'id':'fids_row'})df = pd.read_html(str(table))arrival = df[0]arrival_filename = todays_date+"_Arrival_Data_IGI.csv"arrival.to_csv(arrival_filename)arrival.to_csv("Arrival_Data_IGI(daily).csv")但是当我运行代码时出现了错误。出现的错误:当我尝试使用 安装 html5lib 时pip install html5lib,出现以下错误:安装任何库或升级 pip 时出错。“无法获取 URL https://pypi.org/simple/pip/:确认 ssl 证书时出现问题:HTTPSConnectionPool(host='pypi.org', port=443):最大重试次数超过 url:/simple /pip/(由 SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:证书链中的自签名证书 (_ssl.c:1051)')) 引起 - 跳过”
添加回答
举报
0/150
提交
取消