import logging from grab import Grab from grab.spider import Spider, Task from urllib import quote import re grabGoogle = Grab() grabGoogle.setup(log_dir = 'c:\logdir') grabGoogle.setup(proxy='210.101.131.231:8080', proxy_type='http', connect_timeout=5, timeout=5) grabGoogle.go('https://google.com')
И получаю
Traceback (most recent call last): File "C:\Documents and Settings\Admin\workspace\test\1.py", line 10, in <module> grabGoogle.go('https://google.com') File "C:\Python27\lib\site-packages\grab-0.4.13-py2.7.egg\grab\base.py", line 356, in go return self.request(url=url, **kwargs) File "C:\Python27\lib\site-packages\grab-0.4.13-py2.7.egg\grab\base.py", line 433, in request self.transport.request() File "C:\Python27\lib\site-packages\grab-0.4.13-py2.7.egg\grab\transport\curl.py", line 389, in request raise error.GrabNetworkError(ex.args[0], ex.args[1]) grab.error.GrabNetworkError: [Errno 56] Received HTTP code 403 from proxy after CONNECT
Т.е. не получается подключится по https протоколу чз прокси.
Как быть в такой ситуации.
Пожалуйста подскажите.