摘要:
xpath表达式 1. xpath语法 <bookstore> <book> <title lang="eng">Harry Potter</title> <price>999</price> </book> <book> <title lang="eng">Learning XML</title> 阅读全文
posted @ 2020-04-06 20:27
__夕颜
阅读(626)
评论(0)
推荐(0)
摘要:
结构化数据:json,xml等 处理方式:直接转化为python类型 非结构化数据:HTML 处理方式:正则表达式、xpath #json.dumps 实现python类型转化为json字符串 #indent实现换行和空格 #ensure_ascii=False实现让中文写入的时候保持为中文 jso 阅读全文
posted @ 2020-04-06 20:09
__夕颜
阅读(270)
评论(0)
推荐(0)
摘要:
requests的底层实现urllib requests在python2 和python3中通用,方法完全一样 1. requests模块发送GET请求、获取响应 #发送请求 response = requests.get(url) #response的常用属性: response.text # 根 阅读全文
posted @ 2020-04-06 19:53
__夕颜
阅读(1999)
评论(0)
推荐(0)
浙公网安备 33010602011771号