Use proxy for content search

pull/16/merge
inpos 2017-12-09 14:37:42 +03:00
parent 20bcba0ac5
commit d9d3b05cd7
1 changed files with 7 additions and 0 deletions

View File

@ -19,6 +19,13 @@
''' '''
import abc import abc
import sys
proxy = int(sys.modules["__main__"].__settings__.getSetting("proxy"))
if proxy == 2:
import socket
from resources import socks
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)
socket.socket = socks.socksocket
import urllib import urllib
import urllib2 import urllib2
import cookielib import cookielib