0

i wrote this code :

import random
import sys
import urllib
openfile = open(sys.argv[1]).readlines()
c = random.choice(openfile)
i = 0
while i < 5:
 i=i+1
 c = random.choice(openfile)
 proxies = {'http': c}
 opener = urllib.FancyURLopener(proxies).open("http://whatismyip.com.au/").read()

::: I put 3 proxy in a txt file . :

http://211.161.159.74:8080
http://119.70.40.101:8080
http://124.42.10.119:8080

but when execute it i get this error :

IOError: [Errno socket error] (10054, 'Connection reset by peer')

what am i going to do ? please help me .

4

1 回答 1

2

您列出的第一个代理也是给我的 telnet 一个 ECONNRESET。是什么让您认为这些是有效的代理?顺便说一句,如果您试图找出他们的 DNS 名称,他们没有任何名称。

$ dig -x  211.161.159.74 
;; connection timed out; no servers could be reached
于 2010-05-22T17:19:37.973 回答