感觉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