上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页
摘要: 搭建并使用代理的步骤 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 阅读(29) 评论(0) 推荐(0) 编辑
摘要: http 和 https区别 -http:超文本传输协议 -https:安全的超文本传输协议 -https=http+ssl/tls -防止:篡改,截取 -必须有证书:才能通信 使用方式 import requests header = { 'User-Agent': 'Mozilla/5.0 (W 阅读全文
posted @ 2024-02-19 16:33 wellplayed 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 获取代理池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 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 超时设置 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 阅读(8) 评论(0) 推荐(0) 编辑
摘要: requests发送请求后会返回响应对象 import requests respone = requests.get('xxx') respone属性 响应体--字符串形式 print(respone.text) 响应体--bytes格式 print(respone.content) 响应状态码 阅读全文
posted @ 2024-02-19 16:17 wellplayed 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 发送登录请求 import requests data = { 'username': '用户名', 'password': '密码', 'captcha': '3333', 'remember': '1', 'ref': ' http://www.aa7a.cn/', # 登录成功,重定向到这个地 阅读全文
posted @ 2024-02-19 16:03 wellplayed 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 首先需要导入模块 import requests 携带get请求方式 params = { 'xxx': 'yyy', } res = requests.get('xxx',params=params) print(res.text) # 打印响应体内容 携带请求头 headers = { 'Use 阅读全文
posted @ 2024-02-19 15:49 wellplayed 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 自定义库存表(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 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 第一步:组件后面加上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 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 第一步:安装echarts模块 cnpm install echarts -S 第二步:在 main.js中全局引入 import echarts from 'echarts' Vue.prototype.$echarts = echarts // 全局引入 后面用this.$echarts就能直接 阅读全文
posted @ 2024-02-07 23:21 wellplayed 阅读(8) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页