Scrapy Torproject
在 Ubuntu 上,
[guy@guy-laptop tmp]$ sudo /etc/init.d/tor status
tor is running
[guy@guy-laptop tmp]$ sudo /etc/init.d/polipo start
Starting polipo: /usr/bin/polipo already running -- doing nothing
polipo.
也:
$ python -c 'import urllib; print urllib.getproxies()'
{'ftp': 'ftp://127.0.0.1:8118/', 'all': 'socks://127.0.0.1:8118/',
'http': 'http://127.0.0.1:8118/', 'https': 'https://127.0.0.1:8118/',
'no': 'localhost,127.0.0.0/8,*.local'}
当运行 scrapy 时,我得到:
错误:下载https://registration.example.com/login.fcc时出错: [失败实例:Traceback(无帧失败): : [('SSL例程', 'SSL23_READ', 'ssl握手 失败')] ]
与此同时,FireFox 成功地正确获取了页面 通过代理
任何帮助将不胜感激, 谢谢, 盖伊
On Ubuntu,
[guy@guy-laptop tmp]$ sudo /etc/init.d/tor status
tor is running
[guy@guy-laptop tmp]$ sudo /etc/init.d/polipo start
Starting polipo: /usr/bin/polipo already running -- doing nothing
polipo.
also:
$ python -c 'import urllib; print urllib.getproxies()'
{'ftp': 'ftp://127.0.0.1:8118/', 'all': 'socks://127.0.0.1:8118/',
'http': 'http://127.0.0.1:8118/', 'https': 'https://127.0.0.1:8118/',
'no': 'localhost,127.0.0.0/8,*.local'}
When running scrapy I get:
ERROR: Error downloading https://registration.example.com/login.fcc:
[Failure instance: Traceback (failure with no frames): : [('SSL routines', 'SSL23_READ', 'ssl handshake
failure')]
]
While on the same time FireFox managed to get the page correctly
through proxy
Any help will be appreciated,
Thanks,
Guy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过通过代理链运行脚本?要在 ubuntu 上安装:
然后配置 /etc/proxychains.conf 文件以与 TOR (socks4/5) 配合使用。
然后你可以通过 TOR 运行任何东西
一旦你知道 TOR 正常工作,我建议在 proxychains.conf 文件中使用安静模式。
Have you tried running the script through proxychains? To install on ubuntu:
then configure the /etc/proxychains.conf file to work with TOR (socks4/5).
Then you can run anything though TOR
Once you know TOR is working correctly, I recommend quiet mode in the proxychains.conf file.