会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Zeng
Think Twice, Code Once
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
7
8
9
10
11
12
13
14
15
···
23
下一页
2024年2月20日
代理池的使用
摘要: 搭建并使用代理的步骤 1 搭建免费代理池 项目下载地址:https://github.com/jhao104/proxy_pool 2 使用虚拟环境安装依赖 3 修改配置文件中的redis配置 DB_CONN = 'redis://127.0.0.1:6379/2' 4 启动爬虫获取免费代理并存入r
阅读全文
posted @ 2024-02-20 15:14 wellplayed
阅读(62)
评论(0)
推荐(0)
2024年2月19日
ssl 认证
摘要: http 和 https区别 -http:超文本传输协议 -https:安全的超文本传输协议 -https=http+ssl/tls -防止:篡改,截取 -必须有证书:才能通信 使用方式 import requests header = { 'User-Agent': 'Mozilla/5.0 (W
阅读全文
posted @ 2024-02-19 16:33 wellplayed
阅读(219)
评论(0)
推荐(0)
requests使用代理
摘要: 获取代理池ip import requests res = requests.get('http://demo.spiderpy.cn/get/?type=https') print(res.json()) print(res.json()['proxy']) # 112.30.155.83:127
阅读全文
posted @ 2024-02-19 16:31 wellplayed
阅读(100)
评论(0)
推荐(0)
requests超时设置,异常处理,上传文件
摘要: 超时设置 import requests respone=requests.get('https://www.baidu.com',timeout=0.0001) 异常处理 import requests from requests.exceptions import * #可以查看requests
阅读全文
posted @ 2024-02-19 16:28 wellplayed
阅读(40)
评论(0)
推荐(0)
requests响应对象
摘要: requests发送请求后会返回响应对象 import requests respone = requests.get('xxx') respone属性 响应体--字符串形式 print(respone.text) 响应体--bytes格式 print(respone.content) 响应状态码
阅读全文
posted @ 2024-02-19 16:17 wellplayed
阅读(29)
评论(0)
推荐(0)
requests实现模拟登录
摘要: 发送登录请求 import requests data = { 'username': '用户名', 'password': '密码', 'captcha': '3333', 'remember': '1', 'ref': ' http://www.aa7a.cn/', # 登录成功,重定向到这个地
阅读全文
posted @ 2024-02-19 16:03 wellplayed
阅读(129)
评论(0)
推荐(0)
requests的基本使用
摘要: 首先需要导入模块 import requests 携带get请求方式 params = { 'xxx': 'yyy', } res = requests.get('xxx',params=params) print(res.text) # 打印响应体内容 携带请求头 headers = { 'Use
阅读全文
posted @ 2024-02-19 15:49 wellplayed
阅读(24)
评论(0)
推荐(0)
2024年2月15日
Django使用聚合查询(价格乘以总数得到总价,并以总价排名)
摘要: 自定义库存表(Stock) class Stock(models.Model): amount = amount = models.IntegerField(verbose_name='数量') price = models.DecimalField(max_digits=10, decimal_p
阅读全文
posted @ 2024-02-15 20:14 wellplayed
阅读(50)
评论(0)
推荐(0)
2024年2月7日
Vue中不刷新页面,只刷新局部组件的方法
摘要: 第一步:组件后面加上v-if方法 <div id="app" ref="app"> <router-view v-if="is_show"/> </div> 第二步:data定义一个变量控制v-if data() { return { is_show: true //定义一个变量控制v-if } 第
阅读全文
posted @ 2024-02-07 23:30 wellplayed
阅读(1039)
评论(0)
推荐(0)
Vue中使用Echarts
摘要: 第一步:安装echarts模块 cnpm install echarts -S 第二步:在 main.js中全局引入 import echarts from 'echarts' Vue.prototype.$echarts = echarts // 全局引入 后面用this.$echarts就能直接
阅读全文
posted @ 2024-02-07 23:21 wellplayed
阅读(39)
评论(0)
推荐(0)
上一页
1
···
7
8
9
10
11
12
13
14
15
···
23
下一页
公告