Python:使用代理打开网址时出错

时间:2016-10-19 19:22:18

标签: python proxy urllib

我有一些网址

https://avito.ru/morozovsk/avtomobili/honda_accord_1998_799656153
https://avito.ru/smolensk/avtomobili/vaz_2109_2000_837834628
https://avito.ru/samara/avtomobili/lada_priora_2013_827964284
https://avito.ru/moskva/avtomobili/citroen_c4_2008_826020328
https://avito.ru/pskov/avtomobili/gaz_gazel_2000_822774146
https://avito.ru/nizhnekamsk/avtomobili/hyundai_santa_fe_2002_813276077
https://avito.ru/kaliningrad/avtomobili/alfa_romeo_147_2001_830166627
https://avito.ru/moskva/avtomobili/bmw_x6_2011_790567407

我尝试用代理打开它

proxy
http://164.132.230.56:34615
http://185.154.15.85:28305
http://82.146.37.48:5870
http://185.87.48.128:49577
http://194.67.209.143:60856
http://91.107.106.33:15213
http://109.248.33.145:44927

我使用代码

for i, proxy in enumerate(proxies):
        print "Trying HTTP proxy %s" % proxy
        result = urllib.urlopen(url, proxies={'https': proxy}).read()

但我总是收到错误

IOError: [Errno socket error] [Errno 10061] ����������� �� �����������,

我已经更改了代理列表,但它没有帮助。 我该如何解决这个问题?

0 个答案:

没有答案