首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
如果将 scrapy 的错误日志直接存入到 mysql 中?
pc10201
·
2014-10-08 11:25:44 +08:00
· 3956 次点击
这是一个创建于 3645 天前的主题,其中的信息可能已经有所发展或是发生改变。
scrapy可以将日志存到一个文件当中,不过好像不太方便分析,因为有许多错误原因是相同的,然后反复往里面写,看起来比较累,我想直接写到数据库中方便分析一些
我试了一下,在pipelines.py中直接写数据库语言好像不起作用
开发环境是win7,python最新版32位,scrapy最新版
最新版
Scrapy
数据库
2 条回复
•
2014-10-31 11:51:18 +08:00
1
Codist
2014-10-08 13:40:26 +08:00
没有碰见过直接入库的日志模块,日志入库一般是写脚本扫描日志文件吧,日志文件分析蛮方便的。不知道在win下是什么感受。这种需求重新实现scrapy的log模块么。
2
Melodic
2014-10-31 11:51:18 +08:00
可以考虑自己写个Middleware来处理,log也在middleware中记录
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
2177 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 25ms ·
UTC 11:17
·
PVG 19:17
·
LAX 04:17
·
JFK 07:17
Developed with
CodeLauncher
♥ Do have faith in what you're doing.