保存cookie的方法:(requests)
ses = requests.session()
ses.post(url,data,headers)
cookie = ses.cookies #即可获取cookie值
注:在ses.post()中添加verify = False 可关闭证书验证
BeautifulSoup4:
bs = BeautifulSoup(html,features="html.parser")
api_span = bs.find_all(class_="plugin_pagetree_children_span")
api_address = []
for api in api_span:
api_address.append(api.text)
return api_address
网友评论