上一页 1 2 3 4 5 6 ··· 21 下一页
摘要: 参数为: --proxy-server="127.0.0.1:1234" google浏览器中的属性: 类似如下: C:\Program Files\Google\Chrome\Application\chrome.exe" --user-data-dir=D:\chrome\102 --proxy 阅读全文
posted @ 2023-10-27 08:07 冰底熊 阅读(188) 评论(0) 推荐(0) 编辑
摘要: MySQL之索引原理与慢查询优化 阅读目录 一 介绍 二 索引的原理 三 索引的数据结构 四 聚集索引与辅助索引 五 MySQL索引管理 六 测试索引 七 正确使用索引 八 联合索引与覆盖索引 九 查询优化神器-explain 十 慢查询优化的基本步骤 十一 慢日志管理 一 介绍 为何要有索引? 一 阅读全文
posted @ 2023-10-26 22:43 冰底熊 阅读(120) 评论(0) 推荐(0) 编辑
摘要: from django.test import TestCase import datetime,time #获取当前时间的两种方法 now = time.strftime("%Y-%m-%d %H:%M:%S") print(now) #2019-01-28 20:25:39 now = date 阅读全文
posted @ 2023-10-26 22:42 冰底熊 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 一、自定义命令 1.不用在命令窗口 敲命令,通过py文件执行爬虫程序。 (1)在项目配置文件scrapy.cfg同级目录下创建一个start.py 文件。 (2)在start.py 文件中写入以下代码: from scrapy.cmdline import execute execute(['scr 阅读全文
posted @ 2023-10-26 22:38 冰底熊 阅读(31) 评论(0) 推荐(0) 编辑
摘要: scrapy 爬虫类 一. 重写 start_request 方法 1. scrapy 起始url 在创建爬虫的时候,父类中会执行start_request 函数,并且默认的回调函数为 def parge(self,response):pass 2. start_request函数 循环url 封装 阅读全文
posted @ 2023-10-26 22:37 冰底熊 阅读(10) 评论(0) 推荐(0) 编辑
摘要: CrawlSpider爬虫的创建 1. 创建项目 scrapy startproject 项目名例如:scrapy startproject circ 2. 创建CrawlSpider 爬虫 scrapy genspider -t crawl 爬虫名 网站名例如:scrapy genspider - 阅读全文
posted @ 2023-10-26 22:36 冰底熊 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 多条件登录 JWT扩展的登录视图,在收到用户名与密码时,也是调用Django的认证系统中提供的authenticate()来检查用户名与密码是否正确。 我们可以通过修改Django认证系统的认证后端(主要是authenticate方法)来支持登录账号既可以是用户名也可以是手机号。 修改Django认 阅读全文
posted @ 2023-10-26 22:35 冰底熊 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 方式一 :在页面中引入vue-video组件实现视频播放 此种方式引入视频播放不能对视频进行加密。 1.安装依赖 npm install vue-video-player --save 2. 在前端项目,main.js文件中引入 //2. 在main.js中注册加载组件 require('video 阅读全文
posted @ 2023-10-26 22:35 冰底熊 阅读(70) 评论(0) 推荐(0) 编辑
摘要: PySpider 相关资源: GitHub: https://github.com/binux/pyspider 文档: http://docs.pyspider.org/en/latest/ 安装 windows 安装 pyspider pip install pyspider 启动 pyspid 阅读全文
posted @ 2023-10-26 22:34 冰底熊 阅读(18) 评论(0) 推荐(0) 编辑
摘要: scrapy-redis是一个基于redis的scrapy组件,通过它可以快速实现简单分布式爬虫程序,该组件本质上提供了三大功能: scheduler - 调度器 dupefilter - URL去重规则(被调度器使用) pipeline - 数据持久化 scrapy-redis组件 1. URL去 阅读全文
posted @ 2023-10-26 22:34 冰底熊 阅读(28) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 21 下一页