问题
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].
回答1:
You might have some luck with DBus, although I don't know if it is provided in a standard install.
来源:https://stackoverflow.com/questions/10029355/python-how-to-get-the-firefoxs-url-bar-content-in-gnu-linux