感觉pyspider不如scrapy好用
三台机器,
首先从 git clone https://github.com/binux/pyspider
然后修改Dockerfile ,其中有些下载很慢的,需手动下载添加进去
FROM hub.c.163.com/library/python:2.7
MAINTAINER binux <roy@binux.me>
# install phantomjs
COPY phantomjs_1.9.6-0wheezy_amd64.deb /opt/pyspider/phantomjs_1.9.6-0wheezy_amd64.deb
RUN apt-get install dpkg \
&& dpkg -i /opt/pyspider/phantomjs_1.9.6-0wheezy_amd64.deb \
&& apt-get -f install
# install requirements
#RUN pip --default-timeout=800 install --egg 'https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-1.2.3.zip#md5=ce4a24cb1746c1c8f6189a97087f21c1'
COPY requirements.txt /opt/pyspider/requirements.txt
COPY mysql-connector-python-1.2.3.zip /opt/pyspider/mysql-connector-python-1.2.3.zip
COPY config.json /opt/pyspider/config.json
RUN apt-get update \
&& apt-get

本文详细介绍了如何在三台机器上使用Docker部署Pyspider,包括修改Dockerfile、安装依赖、配置数据库连接、设置启动脚本以及启动和管理Docker容器的步骤。同时,文章对比了Pyspider与Scrapy的使用体验。
最低0.47元/天 解锁文章
7920

被折叠的 条评论
为什么被折叠?



