selenium 启动代码

from selenium import webdriver
browser = webdriver.Chrome(executable_path='F:/chromedriver/chromedriver_win32/chromedriver.exe')


url = 'https://www.baidu.com/'
browser.get(url)
text = browser.page_source
# browser.close()
print(text)

 

posted @ 2019-07-29 13:01  山…隹  阅读(182)  评论(0编辑  收藏  举报