Python - 如何在GNU / Linux中获取Firefox的URL栏内容? [英] Python - How to get the Firefox's URL bar content in GNU/Linux?

查看:155
本文介绍了Python - 如何在GNU / Linux中获取Firefox的URL栏内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用Python来获取Firefox(当前打开的选项卡)的URL栏的内容。我发现几个Windows解决方案(使用pywin32库),但我需要它的GNU / Linux(如果可用,那么多平台的方式是最受欢迎的,当然)。我也找到了通过安装Firefox的插件的方法,但我希望用户只安装Python和(需要的时候)它的库[Python]。

解决方案

您可能对DBus有一些好运,尽管我不知道它是否在标准安装中提供。 p>

I need to get the content of URL bar (of currently opened tab) of Firefox using Python. I've found few solutions for Windows (using libraries such as pywin32) but I need it for GNU/Linux (if available then multi-platform way is the most preferred, of course). I have also found ways doing it by installing add-on for Firefox but I want user to install only Python and (when it's needed) libraries for it [Python].

解决方案

You might have some luck with DBus, although I don't know if it is provided in a standard install.

这篇关于Python - 如何在GNU / Linux中获取Firefox的URL栏内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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