2012-01-17 7 views
3

Scrapy Torproject

$ 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実行している:同じ時間にFirefoxがページを正しく得ることができますが

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

を プロキシ経由で

助けていただければ幸いです。 ありがとう、 Guy

答えて

3

このスクリプトをproxychainsで実行しようとしましたか? Ubuntuでインストールするには:

:~$ sudo apt-get install proxychains 

はその後、TOR(SOCKS4/5)で動作するように/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