import os, sys
# linux系统
if "win" not in sys.platform:
browserName = "chrome"
cmd = "pkill {}".format(browserName)
else:
#windows系统
browserName = "chrome.exe"
cmd = "taskkill /f /t /im {}".format(browserName)
os.system(cmd)
如何实现python关闭浏览器?
最新推荐文章于 2023-06-05 21:09:11 发布