爬虫代理squid

1 yum -y install squid

配置文件一般是在/etc/squid3/下的squid.conf文件

pyspider使用的时候只需要设置代理服务器为你配置好的服务器的IP就可以了
1 class Handler(BaseHandler):
2     crawl_config = {
3         'proxy': '127.0.0.1:6666'
4     }
posted @ 2017-11-02 13:58  大明湖畔的守望者  阅读(925)  评论(0编辑  收藏  举报