摘要: 简介 代理:使用别人的ip地址发送请求,隐藏自己的ip地址。再requests.get()通过 proxies=proxies实现 需要获取另一个电脑的ip地址和可用端口号。ip地址再百度搜免费代理 url = "https://www.baidu.com" proxies = { "https": 阅读全文
posted @ 2021-10-11 19:16 remix_alone 阅读(142) 评论(0) 推荐(0)
摘要: 简介 python中cookie用于模拟用户登录。 通过创建 session = request.session(),使用session.get(url=url,headers=headers,params=params,cookies=cookies) 达到在会话过程中,响应头,参数,cookie 阅读全文
posted @ 2021-10-11 19:14 remix_alone 阅读(1848) 评论(0) 推荐(0)
摘要: 简介 BeutifulSoup:是用来解析html文档的模块 导入 Import bs4.builder 方法 bs4.BeautifulSoup(page_content,"html.parser") 参数: page_content:页面内容 html.parser:页面解析方式 返回值:htm 阅读全文
posted @ 2021-10-11 19:06 remix_alone 阅读(250) 评论(0) 推荐(0)