Issue
I have socks5 proxy -> socks5://login:password@ip:port
i am tried:
class ProxyMiddleware:
def process_request(self, request, spider):
# Set the location of the proxy
request.meta['proxy'] = "http://ip:port"
proxy_user_pass = "login:password"
encoded_user_pass = base64.encodestring(proxy_user_pass)
request.headers['Proxy-Authorization'] = 'Basic ' + encoded_user_pass
middleware:
DOWNLOADER_MIDDLEWARES = {
'bog_name.middlewares.ProxyMiddleware': 100,
}
Scrapy doesn't use proxy
Solution
It seems that scrapy doesn't support socks5 proxy out of the box. Here is issue on Github about it. And couple workarounds proposed by users in that topic - one, two
Answered By - elebur
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.