© 1999-2048 dssz.net 粤ICP备11031372号
[其它] 爬虫基础(二)
说明:爬虫中数据的分类 结构化数据 :json,xml等 处理方式:直接转化为python类型 非结构化数据:html 处理方式:re 正则表达式,xpath json模块方法(浏览器切换手机版) 可以根据删除请求的url地址的参数,剃掉不想要的json数据,如:callback json.dumps 把python类型转化为json字符串 json.loads json字符串数据转化为python类型 with open(“a.txt”,“w”,encoding=“utf-8”) as<weixin_38685793> 上传 | 大小:131kb