Python中的网页浏览器问题 [英] Python Webbrowser question

查看:204
本文介绍了Python中的网页浏览器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用python的web浏览器模块打开网页在系统上的默认网页浏览器。

I'm opening a webpage in the default webbrowser on the system using python's webbrowser module.

我要检查,如果该网站已经在浏览器中打开且仅当它是不是打开一个新标签/窗口。否则重装已经打开的网页。

I want to check if the site is already open in the browser and only open a new tab/window if it is not. Otherwise reload the already opened page.

有没有办法用网页浏览器模块来做到这一点?如果没有,是否有任何其他的模块,我可以用它来做到这一点。

Is there a way to do this with webbrowser module? If not, is there any other module i can use to do this.

推荐答案

我不认为这是目前可能使用 web浏览器模块。有申请了这个错误,但它与关闭状态不会解决

I don't think this is currently possible with the webbrowser module. There was a bug filed for this, but it was closed with status "Won't fix":

http://bugs.python.org/issue1753371

这篇关于Python中的网页浏览器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆