2012-01-17 5 views
3
우분투에

, 또한Scrapy Torproject

[[email protected] tmp]$ sudo /etc/init.d/tor status 
tor is running 
[[email protected] tmp]$ sudo /etc/init.d/polipo start 
Starting polipo: /usr/bin/polipo already running -- doing nothing 
polipo. 

는 : scrapy를 실행하는 경우

$ 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'} 

내가 얻을 :

ERROR: Error downloading https://registration.example.com/login.fcc : [Failure instance: Traceback (failure with no frames): : [('SSL routines', 'SSL23_READ', 'ssl handshake failure')] ]

같은 시간에 파이어 폭스가 제대로 를 페이지를 얻을 수 있었다 동안 프록시를 통해

도움이 되겠습니다. 고마워요, 가이

답변

3

프록시 체인을 통해 스크립트를 실행 해 보았습니까? 우분투에 설치하려면 :

:~$ sudo apt-get install proxychains 

는 (SOCKS4가/5) TOR와 함께 작동하도록 /etc/proxychains.conf 파일을 구성합니다. 당신이 TOR가 제대로 작동 알게되면 TOR

:~$ proxychains scriptwhatever.py target 

, 내가 proxychains.conf 파일에 자동 모드를 권장하지만

# defaults set to "tor" 

socks4 127.0.0.1 9050

그런 다음 당신은 아무것도를 실행할 수 있습니다.

# Quiet mode (no output from library).
quiet_mode