#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 无界面模式
猜你喜欢
转载自blog.csdn.net/weixin_55109596/article/details/123703876
今日推荐
周排行