Browse Source

add sleep

master
jyhl 4 years ago
parent
commit
0f24456f16
  1. 10
      demo.py

10
demo.py

@ -1,3 +1,5 @@
#!coding: utf-8
import os
import zipfile
@ -6,8 +8,7 @@ from selenium import webdriver
PROXY_HOST = 'u1.5.tn.16yun.cn' # rotating proxy or host
PROXY_PORT = 6441 # port
PROXY_USER = '16ZJZYVL' # username
PROXY_PASS = '167813' # password
PROXY_PASS = '112213' # password
manifest_json = """
{
@ -89,10 +90,13 @@ def get_chromedriver(use_proxy=False, user_agent=None):
chrome_options=chrome_options)
return driver
def main():
import time
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')
time.sleep(10)
if __name__ == '__main__':
main()

Loading…
Cancel
Save