1 2 Fork me on GitHub 6
摘要: numpy get started 导入numpy库,并查看numpy版本 import numpy as np np.__version__ '1.14.0' 一、创建ndarray 1. 使用np.array()由python list创建 参数为列表: [1, 4, 2, 5, 3] 注意: 阅读全文
posted @ 2020-05-28 17:03 peng_li 阅读(148) 评论(0) 推荐(0) 编辑
摘要: ”python爬虫系列“目录: Python爬虫(一)-必备基础 Python爬虫(二)- Requests爬虫包及解析工具 xpath Python爬虫(三)- Scrapy爬虫框架系列 scrapy (1)- 基础用法 scrapy (2)- get请求 scrapy (3)- post请求 s 阅读全文
posted @ 2020-05-26 14:51 peng_li 阅读(497) 评论(0) 推荐(0) 编辑
摘要: ”python爬虫系列“目录: Python爬虫(一)-必备基础 Python爬虫(二)- Requests爬虫包及解析工具 xpath Python爬虫(三)- Scrapy爬虫框架系列 scrapy (1)- 基础用法 scrapy (2)- get请求 scrapy (3)- post请求 s 阅读全文
posted @ 2020-05-26 13:18 peng_li 阅读(3521) 评论(0) 推荐(0) 编辑
摘要: ”python爬虫系列“目录: Python爬虫(一)-必备基础 Python爬虫(二)- Requests爬虫包及解析工具 xpath Python爬虫(三)- Scrapy爬虫框架系列 scrapy (1)- 基础用法 scrapy (2)- get请求 scrapy (3)- post请求 s 阅读全文
posted @ 2020-05-26 13:17 peng_li 阅读(368) 评论(0) 推荐(0) 编辑
摘要: ”python爬虫系列“目录: Python爬虫(一)-必备基础 Python爬虫(二)- Requests爬虫包及解析工具 xpath Python爬虫(三)- Scrapy爬虫框架系列 scrapy (1)- 基础用法 scrapy (2)- get请求 scrapy (3)- post请求 s 阅读全文
posted @ 2020-05-26 13:15 peng_li 阅读(302) 评论(2) 推荐(0) 编辑
摘要: ”python爬虫系列“目录: Python爬虫(一)-必备基础 Python爬虫(二)- Requests爬虫包及解析工具 xpath Python爬虫(三)- Scrapy爬虫框架系列 scrapy (1)- 基础用法 scrapy (2)- get请求 scrapy (3)- post请求 s 阅读全文
posted @ 2020-05-26 13:14 peng_li 阅读(1473) 评论(0) 推荐(0) 编辑
摘要: Python中有join()和os.path.join()两个函数,具体作用如下: join(): 连接字符串数组。将字符串、元组、列表中的元素以指定的字符(分隔符)连接生成一个新的字符串 os.path.join(): 将多个路径组合后返回 一、函数说明 1、join()函数 语法: 'sep'. 阅读全文
posted @ 2020-05-19 23:01 peng_li 阅读(773) 评论(0) 推荐(0) 编辑
摘要: 首先说一下,为什么要进行会话保持的操作? requests库的session会话对象可以跨请求保持某些参数,说白了,就是比如你使用session成功的登录了某个网站,则在再次使用该session对象请求该网站的其他网页都会默认使用该session之前使用的cookie等参数。尤其是在保持登陆状态时运 阅读全文
posted @ 2020-05-19 22:43 peng_li 阅读(2545) 评论(0) 推荐(0) 编辑
摘要: ”python爬虫系列“目录: Python爬虫(一)-必备基础 Python爬虫(二)- Requests爬虫包及解析工具 xpath Python爬虫(三)- Scrapy爬虫框架系列 scrapy (1)- 基础用法 scrapy (2)- get请求 scrapy (3)- post请求 s 阅读全文
posted @ 2020-05-19 18:29 peng_li 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 平时在爬取某些网页的时候,可能是由于网络不好或者代理池中的代理不能用导致请求失败。此时有们需要重复多次去请求,python中有现成的,相应的包供我们使用: 1. 我们可以利用retry模块进行多次请求,如果全部都失败才报错。当然使用retry库之前也需要先安装,eg: 阅读全文
posted @ 2020-05-18 18:25 peng_li 阅读(1605) 评论(0) 推荐(0) 编辑
1