0

I have some urls

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

I try to open it with proxies

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

I use code

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

but I always get an error

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

I have already changed the list of proxies, but it doesn't help. How can I solve this problem?

Petr Petrov
  • 4,090
  • 10
  • 31
  • 68
  • this post last answer will help you : http://stackoverflow.com/questions/9586951/python-urllib-request-urlopen-returning-error-10061 – Shekhar Samanta Oct 19 '16 at 19:25
  • @ShekharSamanta I don't understand, where the problem. I use proxy and I think it doesn't appear – Petr Petrov Oct 19 '16 at 20:14
  • You might be better off using urllib2 and its ProxyHandler: http://stackoverflow.com/questions/1450132/proxy-with-urllib2 – Jorge Oct 19 '16 at 21:50

0 Answers0