#selenium无界面模式
from msedge.selenium_tools import EdgeOptions
from msedge.selenium_tools import Edge
options=EdgeOptions()
options.use_chromium = True
options.add_argument("headless")
driver=Edge(executable_path="msedgedriver.exe",options=options)
driver.get("https://www.baidu.com") #打开百度首页
print(driver.page_source) #获取网页源码
Selenium edge 无界面模式
最新推荐文章于 2024-08-07 10:54:32 发布