摘要: 解决方法: 找到MySQL安装路径,默认是:C:\Program Files\MySQL\MySQL Server 5.5\bin 管理员cmd进入这个路径,安装MySQL服务,命令为:mysqld.exe --install 显示Service successfully installed.表示M 阅读全文
posted @ 2022-06-30 21:56 孤舟浮岸 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 新建一个Scrapy项目 选取一个路径,cmd在这个目录下执行以下命令: scrapy startproject python123demo 生成的文件目录 scrapy.cfg 为部署scrapy爬虫使用的。这里部署的概念是指将这样的爬虫放在特定的服务器上,并且在服务器配置好相关的操作接口。 对于 阅读全文
posted @ 2022-05-21 20:25 孤舟浮岸 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 验证scrapy是否安装:scrapy -h 阅读全文
posted @ 2022-05-21 18:43 孤舟浮岸 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 相同点 不同点 阅读全文
posted @ 2022-05-21 17:44 孤舟浮岸 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Scrapy不是一个函数功能库,而是一个爬虫框架。 Scrapy爬虫框架包含7个部分,即5+2结构:5个框架主体部分,2个中间键。 5个模块 engine模块 已有实现。 整个框架的核心,控制所有模块之间的数据流,任何模块与模块之间的数据流动都要经过engine模块的调度。 根据条件触发事件;根据各 阅读全文
posted @ 2022-05-20 19:17 孤舟浮岸 阅读(489) 评论(0) 推荐(0) 编辑
摘要: https://www.icourse163.org/learn/ZJU-1206456840 https://pintia.cn/problem-sets/1497398176843997184/problems/1497398251064791057 7-3 阶梯电价 分数 30 作者 陈春晖 阅读全文
posted @ 2022-05-19 21:34 孤舟浮岸 阅读(3444) 评论(0) 推荐(0) 编辑
摘要: https://www.icourse163.org/learn/ZJU-1206456840 https://pintia.cn/problem-sets/1497398176843997184/problems/1497398251064791050 Python程序设计第二章(MOOC) 17 阅读全文
posted @ 2022-05-19 21:18 孤舟浮岸 阅读(1600) 评论(0) 推荐(0) 编辑
摘要: https://www.runoob.com/python/python-func-int.html int() 方法的语法: class int(x, base=10) x -- 字符串或数字。 base -- 进制数,默认十进制。 错误示例 int("92",8) 异常类型:ValueError 阅读全文
posted @ 2022-05-19 19:16 孤舟浮岸 阅读(881) 评论(0) 推荐(0) 编辑
摘要: 对齐: < (默认)左对齐、> 右对齐、^ 中间对齐 ^中间对齐的代码示例 # 20的位置只能是常量,10的位置可以是int类型的变量 # 20表示占用20个长度的位置,10表示有10个* print('{:^20}'.format('*'*10)) 控制台输出 ********** 进程已结束,退 阅读全文
posted @ 2022-05-19 18:03 孤舟浮岸 阅读(24) 评论(0) 推荐(0) 编辑
摘要: strip()方法,去除字符串开头或者结尾的空格 https://www.cnblogs.com/valorchang/p/11470901.html 阅读全文
posted @ 2022-05-19 17:11 孤舟浮岸 阅读(34) 评论(0) 推荐(0) 编辑
摘要: https://www.runoob.com/python/python-func-isinstance.html 应用场景: 爬虫进行数据采集时,去除不适合的内容。 例如 for tr in soup.find('tbody').children: if isinstance(tr, bs4.el 阅读全文
posted @ 2022-05-19 16:57 孤舟浮岸 阅读(27) 评论(0) 推荐(0) 编辑
摘要: HTML hyper text markup language。超文本标记语言。是WWW的信息组织方式,能将声音、图像、视频等超文本信息嵌入到文本中。 HTML通过预定义的<>...</>标签形式组织不同类型的信息。 信息标记的三种形式 XML eXtensible Markup Language。 阅读全文
posted @ 2022-05-19 10:51 孤舟浮岸 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 信息来源: https://www.ruanyifeng.com/blog/2022/05/weekly-issue-206.html 工具 第5个 开发者: https://github.com/zonemeen/musicn 我自己copy了一下,不懂版权啥的,干脆设为私有吧,自己看着玩。 ht 阅读全文
posted @ 2022-05-18 17:49 孤舟浮岸 阅读(256) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2022.cnblogs.com/blog/1246363/202205/1246363-20220518172721892-1215576413.png) ![](https://img2022.cnblogs.com/blog/1246363/202205/1246363-20220518172820196-1451094294.png) ![](https:// 阅读全文
posted @ 2022-05-18 17:27 孤舟浮岸 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 正着切 [开始索引:结束索引] s = 'ABCDLSESRF' s3 = s[0:4] # 此表达式表示从索引0开始,知道索引4为止,但是不包括索引4,即索引0,1,2,3 print(s3) # 输出结果为‘ABCD’ s4 = s[:4] # 注意,切片前面的0可以省略,与s[0:4] 效果相 阅读全文
posted @ 2022-05-18 16:09 孤舟浮岸 阅读(458) 评论(0) 推荐(0) 编辑
摘要: Request Response对象 阅读全文
posted @ 2022-05-18 13:03 孤舟浮岸 阅读(18) 评论(0) 推荐(0) 编辑
摘要: https://www.py.cn/tools/pycharm/19759.html 文件 -- 设置 -- 编辑器 -- 检查 -- 校对 阅读全文
posted @ 2022-05-17 20:51 孤舟浮岸 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 正则表达式 regular expression;regex;RE 正则表达式是用来简洁表达一组字符串的表达式。 通用的字符串表达框架 简洁表达一组字符串的表达式 种针对字符串表达“简洁”和“特征”思想的工具 判断某字符串的特征归属 优势:简洁 比如: PY+表示:以P开头,后面有一个或无穷多个Y的 阅读全文
posted @ 2022-05-17 20:17 孤舟浮岸 阅读(25) 评论(0) 推荐(0) 编辑
摘要: https://www.icourse163.org/learn/ZJU-1206456840 https://pintia.cn/problem-sets/1497398176843997184/problems/1497398251064791043 Python程序设计第二章(MOOC) 20 阅读全文
posted @ 2022-05-16 15:51 孤舟浮岸 阅读(1734) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_45697428/article/details/118639347 https://www.bilibili.com/video/BV1gT4y1P7Gk https://www.yuque.com/books/share/23ed129f-9c7 阅读全文
posted @ 2022-05-16 15:40 孤舟浮岸 阅读(62) 评论(0) 推荐(0) 编辑