Python获取xml数据
def get_store(self,):
try:
resp=session.get(url=self.base_url,headers=self.headers,verify=False).content.decode()
result = etree.XML(resp)
self.data_list=result.xpath('//shop/@v')
logging.info(self.data_list)
except Exception:
traceback.print_exc()