栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

如何在Docker Compose中通过Srivpy和Tor通过Privoxy使用Tor

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何在Docker Compose中通过Srivpy和Tor通过Privoxy使用Tor

在水族馆模板项目(https://github.com/TeamHG-Memex/aquarium)之后,我发现诀窍是使Splash使用Tor,而不是直接使用蜘蛛。

我改编的项目具有以下结构:

.├── docker-compose.yml├── example│   ├── Dockerfile│   ├── scrapy.cfg│   └── scrashtest│       ├── __init__.py│       ├── settings.py│       └── spiders│           ├── __init__.py│           └── quotes.py└── splash    └── proxy-profiles        └── default.ini

docker-compose.yml

version: '3'services:  scraper:    build: ./example    links:      - splash  tor-privoxy:    image: rdsubhas/tor-privoxy-alpine  splash:    image: scrapinghub/splash    volumes:      - ./splash/proxy-profiles:/etc/splash/proxy-profiles:ro    links:      - tor-privoxy

在http://splash.readthedocs.io/en/stable/api.html#proxy-
profiles之后
,我将

proxy-profiles
目录作为卷挂载到了
splash
容器中。在读
default.ini

[proxy]host=tor-privoxyport=8118

(我也注意到称它为必不可少的

default.ini
)。

通过此设置,on

docker-compose build
docker-compose up
刮板使用Splash成功运行。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/626297.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号