上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 0.问题现象和原因 如下图所示,由于 Scrapyd 的 Web Interface 的 log 链接直接指向 log 文件,Response Headers 的 Content-Type 又没有声明字符集 charset=UTF-8,因此通过浏览器查看 log 会出现非 ASCII 乱码。 1.解 阅读全文
posted @ 2018-07-15 16:18 my8100 阅读(1495) 评论(0) 推荐(0) 编辑
摘要: 0.参考 Scrapy 隐含 bug: 强制关闭爬虫后从 requests.queue 读取的已保存 request 数量可能有误 1.说明 Scrapy 设置 jobdir,停止爬虫后,保存文件目录结构: requests.queue/p0 文件保存 priority=0 的未调度 request 阅读全文
posted @ 2018-07-11 19:07 my8100 阅读(1269) 评论(0) 推荐(1) 编辑
该文被密码保护。 阅读全文
posted @ 2018-06-02 18:23 my8100 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 0.参考 http://lxml.de/tutorial.html#the-xml-function There is also a corresponding function HTML() for HTML literals. >>> root = etree.HTML("<p>data</p> 阅读全文
posted @ 2018-06-01 16:38 my8100 阅读(27371) 评论(0) 推荐(0) 编辑
摘要: 0.参考 1.初始化 2.Xpath 父节点/上一个下一个兄弟节点 3.CSS 第几个子节点 3.1 通用 3.2 特别指代 3.3 上述 -child 修改为 -of-type ,仅对 过滤后的相应子节点列表 进行计数 4.Xpath 第几个子节点 阅读全文
posted @ 2018-05-03 12:13 my8100 阅读(12589) 评论(0) 推荐(0) 编辑
摘要: 0.参考资料 https://redis.io/topics/data-types-intro An introduction to Redis data types and abstractions http://redisdoc.com/ Redis 命令参考 1.scrapy_redis 2. 阅读全文
posted @ 2018-02-21 12:39 my8100 阅读(627) 评论(0) 推荐(0) 编辑
摘要: 1.参考 https://doc.scrapy.org/en/latest/topics/spiders.html#scrapy.spiders.Spider.start_requests 自动提交 login.php 返回表单 https://doc.scrapy.org/en/latest/to 阅读全文
posted @ 2017-12-27 16:14 my8100 阅读(2494) 评论(0) 推荐(0) 编辑
摘要: 0. 1.参考 https://docs.python.org/3/library/urllib.html urllib is a package that collects several modules for working with URLs: urllib.request for open 阅读全文
posted @ 2017-12-26 16:57 my8100 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 0. 1.参考 【工作】Nginx限制IP并发连接数和请求数的研究 Module ngx_http_limit_conn_module Module ngx_http_limit_req_module 漏桶算法和 NGINX 的 limit_req 模块 漏桶这个名字,其实就非常形象的描述了算法本身 阅读全文
posted @ 2017-12-18 15:22 my8100 阅读(16868) 评论(0) 推荐(0) 编辑
摘要: 0. 1.参考 提升网站访问速度的 SQL 查询优化技巧 缓存一切数据,读取内存而不是硬盘IO 如果你的服务器默认情况下没有使用MySQL查询缓存,那么你应该开启缓存。开启缓存意味着MySQL 会把所有的语句和语句执行的结果保存下来,如果随后有一条与缓存中完全相同的语句需要执行,那么MySQL 就会 阅读全文
posted @ 2017-12-15 17:19 my8100 阅读(267) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页