上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 阅读全文
posted @ 2019-11-29 16:22 liuxianglong 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 官网说明:https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#using-conda-in-windows-batch-script-exits-early bat中调用conda 需要使用CA 阅读全文
posted @ 2019-11-28 13:01 liuxianglong 阅读(2300) 评论(0) 推荐(0) 编辑
摘要: 官网log说明:https://docs.scrapy.org/en/latest/topics/logging.html#scrapy.utils.log.configure_logging 这里记一点容易遗漏的问题: 就是使用CrawlerProcesser类scrapy会加载settings. 阅读全文
posted @ 2019-11-26 16:45 liuxianglong 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 官网中关于ReactorNotRestartable的错误描述(摘自:https://twistedmatrix.com/documents/16.1.0/api/twisted.internet.error.html),我们将从scrapy源码分析这个问题 重点要了解scrapy源码下的crawl 阅读全文
posted @ 2019-11-26 11:58 liuxianglong 阅读(3083) 评论(0) 推荐(0) 编辑
摘要: Deferred可以添加多个回调函数,每个回调函数的结果作为下一个回调函数的参数 代码实例(可在pycharm中运行,摘自 https://twistedmatrix.com/documents/current/core/howto/defer.html) from twisted.internet 阅读全文
posted @ 2019-11-25 14:43 liuxianglong 阅读(294) 评论(0) 推荐(0) 编辑
摘要: Deferred是一个延迟加载对象,这个概念类似于tornado future,是调用异步操作返回的一个对象,其中包括了操作成功后的回调处理,错误后的回调处理。 简单讲,当我们需要执行一个耗时操作,比如下载某个大图片,此时用twisted的异步http请求,会给我们返回一个Deferred对象,让我 阅读全文
posted @ 2019-11-25 13:05 liuxianglong 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 只需要在django项目下的APP下的admin.py重写以下几个变量即可,不需要改django源码 from django.contrib import admin admin.site.site_title = "登陆xxx管理系统" # 这个会在登陆的时候显示在浏览器标签页 admin.sit 阅读全文
posted @ 2019-11-18 11:13 liuxianglong 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 我的环境: celery 3.1.25 python 3.6.9 window10 celery tasks 代码如下,其中 QuotesSpider 是我的scrapy项目爬虫类名称 from celery_app import app from scrapy.crawler import Cra 阅读全文
posted @ 2019-09-20 17:37 liuxianglong 阅读(1560) 评论(2) 推荐(0) 编辑
摘要: celery 搭配flower使用,flower默认使用的是UTC时间,那么如何在flower中使用当前城市的时间呢 我的环境 celery 3.1.25 ,python 3.69 1.在 app设置文件中设置时区,加上下面两句 CELERY_TIMEZONE = 'Asia/Shanghai' C 阅读全文
posted @ 2019-09-20 11:33 liuxianglong 阅读(957) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-09-19 20:47 liuxianglong 阅读(1026) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页