|
|
@ -1,3 +1,5 @@ |
|
|
|
|
|
|
|
#!coding: utf-8 |
|
|
|
|
|
|
|
|
|
|
|
import os |
|
|
|
import os |
|
|
|
import zipfile |
|
|
|
import zipfile |
|
|
|
|
|
|
|
|
|
|
@ -6,8 +8,7 @@ from selenium import webdriver |
|
|
|
PROXY_HOST = 'u1.5.tn.16yun.cn' # rotating proxy or host |
|
|
|
PROXY_HOST = 'u1.5.tn.16yun.cn' # rotating proxy or host |
|
|
|
PROXY_PORT = 6441 # port |
|
|
|
PROXY_PORT = 6441 # port |
|
|
|
PROXY_USER = '16ZJZYVL' # username |
|
|
|
PROXY_USER = '16ZJZYVL' # username |
|
|
|
PROXY_PASS = '167813' # password |
|
|
|
PROXY_PASS = '112213' # password |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
manifest_json = """ |
|
|
|
manifest_json = """ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -89,10 +90,13 @@ def get_chromedriver(use_proxy=False, user_agent=None): |
|
|
|
chrome_options=chrome_options) |
|
|
|
chrome_options=chrome_options) |
|
|
|
return driver |
|
|
|
return driver |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
def main(): |
|
|
|
|
|
|
|
import time |
|
|
|
driver = get_chromedriver(use_proxy=True) |
|
|
|
driver = get_chromedriver(use_proxy=True) |
|
|
|
#driver.get('https://www.google.com/search?q=my+ip+address') |
|
|
|
driver.implicitly_wait(10) # seconds |
|
|
|
driver.get('https://httpbin.org/ip') |
|
|
|
driver.get('https://httpbin.org/ip') |
|
|
|
|
|
|
|
time.sleep(10) |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
if __name__ == '__main__': |
|
|
|
main() |
|
|
|
main() |
|
|
|