会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
liuxianglong
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
下一页
2019年11月29日
chrome xpath调试
摘要:
阅读全文
posted @ 2019-11-29 16:22 liuxianglong
阅读(208)
评论(0)
推荐(0)
2019年11月28日
脚本(bat、shell)调用conda
摘要: 官网说明: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
阅读(2401)
评论(0)
推荐(0)
2019年11月26日
CrawlerRunner没有Log输出
摘要: 官网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
阅读(416)
评论(0)
推荐(0)
解决django或者其他线程中调用scrapy报ReactorNotRestartable的错误
摘要: 官网中关于ReactorNotRestartable的错误描述(摘自:https://twistedmatrix.com/documents/16.1.0/api/twisted.internet.error.html),我们将从scrapy源码分析这个问题 重点要了解scrapy源码下的crawl
阅读全文
posted @ 2019-11-26 11:58 liuxianglong
阅读(3205)
评论(0)
推荐(0)
2019年11月25日
理解twisted中的reactor和deferred(二)
摘要: Deferred可以添加多个回调函数,每个回调函数的结果作为下一个回调函数的参数 代码实例(可在pycharm中运行,摘自 https://twistedmatrix.com/documents/current/core/howto/defer.html) from twisted.internet
阅读全文
posted @ 2019-11-25 14:43 liuxianglong
阅读(311)
评论(0)
推荐(0)
理解twisted中的reactor和deferred(一)
摘要: Deferred是一个延迟加载对象,这个概念类似于tornado future,是调用异步操作返回的一个对象,其中包括了操作成功后的回调处理,错误后的回调处理。 简单讲,当我们需要执行一个耗时操作,比如下载某个大图片,此时用twisted的异步http请求,会给我们返回一个Deferred对象,让我
阅读全文
posted @ 2019-11-25 13:05 liuxianglong
阅读(468)
评论(0)
推荐(0)
2019年11月18日
修改 Django Administration
摘要: 只需要在django项目下的APP下的admin.py重写以下几个变量即可,不需要改django源码 from django.contrib import admin admin.site.site_title = "登陆xxx管理系统" # 这个会在登陆的时候显示在浏览器标签页 admin.sit
阅读全文
posted @ 2019-11-18 11:13 liuxianglong
阅读(343)
评论(0)
推荐(0)
2019年9月20日
celery 调用scrapy
摘要: 我的环境: 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
阅读(1676)
评论(2)
推荐(0)
flower 时区设置
摘要: 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
阅读(1062)
评论(0)
推荐(0)
2019年9月19日
windows 安装 celery 避坑指南,看这篇就够了
摘要:
阅读全文
posted @ 2019-09-19 20:47 liuxianglong
阅读(1043)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
下一页
公告