摘要: 下面是大纲,具体内容放在Github 第一部分: requests的使用: 使用requests发起请求,获取网页数据 get请求 UA伪装 post请求 JSON数据的处理 使用正则表达式解析数据 使用bs4解析数据 第二部分: 使用Xpath解析数据 selenium的使用 第三部分: 验证码识 阅读全文
posted @ 2021-05-26 15:20 荒唐了年少 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 最简单的形式,不需要任何处理: obj = requests.get(url).json() 遇到JSON数据无法解析时,可能原因需要去除获取的数据头尾不属于JSON数据的部分: page_text = getResponse(url).text sonObj = demjson.decode(pa 阅读全文
posted @ 2021-05-26 15:03 荒唐了年少 阅读(1028) 评论(0) 推荐(0) 编辑
摘要: YouTube-dl的安装与使用:ytdl-org/youtube-dl: Command-line program to download videos from YouTube.com and other video sites (github.com) 下面是以m4a格式下载音频以及对应中文字 阅读全文
posted @ 2021-05-26 10:49 荒唐了年少 阅读(2252) 评论(4) 推荐(0) 编辑