Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 688 Bytes

File metadata and controls

28 lines (24 loc) · 688 Bytes

selenium_browser

A generic library to control the browser based on selenium.

installation

pip install selenium webdriver_manager seleniumbase requests

usage

from browser import Browser

browser = Browser()
driver = browser.open_browser(start_url='http://xfxuezhang.cn', proxy='http://127.0.0.1:7890')
driver.get('https://myip.ipip.net/')
browser.wait_loading()
time.sleep(5)
driver.get('https://bot.sannysoft.com/')
browser.wait_loading()
try:
    time.sleep(600)
except Exception as e:
    print('done!')
finally:
    browser.quit_browser()

image