#!/usr/bin/env python
# encoding: utf-8

"""
@author: zhanghe
@software: PyCharm
@file: test_proxy.py
@time: 16-4-12 下午2:27
"""


import sys
sys.path.append('..')

from config import CHROME_DRIVER_PATH
from selenium import webdriver


PROXY = "http://192.168.2.158:3128"  # IP:PORT or HOST:PORT

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)

chrome = webdriver.Chrome(executable_path=CHROME_DRIVER_PATH, chrome_options=chrome_options)
chrome.get("http://ip.cn")


if __name__ == '__main__':
    pass

9fd9adc301f66034a54a0808ccf0a2a218017fbc
<mask token>

<mask token>
sys.path.append('..')
<mask token>
chrome_options.add_argument('--proxy-server=%s' % PROXY)
<mask token>
chrome.get('http://ip.cn')
if __name__ == '__main__':
    pass

<mask token>
sys.path.append('..')
<mask token>
PROXY = 'http://192.168.2.158:3128'
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)
chrome = webdriver.Chrome(executable_path=CHROME_DRIVER_PATH,
    chrome_options=chrome_options)
chrome.get('http://ip.cn')
if __name__ == '__main__':
    pass

<mask token>
import sys
sys.path.append('..')
from config import CHROME_DRIVER_PATH
from selenium import webdriver
PROXY = 'http://192.168.2.158:3128'
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)
chrome = webdriver.Chrome(executable_path=CHROME_DRIVER_PATH,
    chrome_options=chrome_options)
chrome.get('http://ip.cn')
if __name__ == '__main__':
    pass

#!/usr/bin/env python
# encoding: utf-8

"""
@author: zhanghe
@software: PyCharm
@file: test_proxy.py
@time: 16-4-12 下午2:27
"""


import sys
sys.path.append('..')

from config import CHROME_DRIVER_PATH
from selenium import webdriver


PROXY = "http://192.168.2.158:3128"  # IP:PORT or HOST:PORT

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)

chrome = webdriver.Chrome(executable_path=CHROME_DRIVER_PATH, chrome_options=chrome_options)
chrome.get("http://ip.cn")


if __name__ == '__main__':
    pass
