Errno socket error in python
Posted
by Emma
on Stack Overflow
See other posts from Stack Overflow
or by Emma
Published on 2010-05-22T17:05:42Z
Indexed on
2010/05/22
17:10 UTC
Read the original article
Hit count: 446
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 .
© Stack Overflow or respective owner