import os

url = 'www.cnblogs.com'
command1 = '"C:\Program Files\Internet Explorer\iexplore.exe" %s' % url
command2 = '"C:\Program Files\Google\Chrome\Application\chrome.exe" %s' % url
command3 = '"D:\Program Files\Mozilla Firefox\\firefox.exe" %s' % url
os.system(command1)
os.system(command2)
os.system(command3)

老婆需要一个小插件,可以指定URL,并且用不同的浏览器打开,查了下原来很简单几行代码。于是记录下来。

URL是指定的网址,可以修改。

下面command1,2,3是指定的浏览器,这里是IE,chrome和firefox,需要在自己电脑上指定路径。

相关文章:

  • 2022-02-15
  • 2022-12-23
  • 2022-02-02
  • 2021-12-29
  • 2022-12-23
  • 2021-08-07
  • 2021-09-07
  • 2022-02-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
相关资源
相似解决方案