

Retrieve the current FireFox URL with python
source link: https://www.codesd.com/item/retrieve-the-current-firefox-url-with-python.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Retrieve the current FireFox URL with python
I want to know what is the current url of active tab in running firefox instance from python module. Does FireFox have any API for this and does python know to work with it?
The most convenient way maybe insatll a firefox extension to open up a tcp service, then you can exchange info with firefox.
mozrepl can set up a telnet service, you can call js-like command to get info.
With telnetscript (http: //code.activestate.com/recipes/152043/), you can write:
import telnetscript
script = """rve
w content.location.href;
ru repl>
w repl.quit()
cl
"""
conn = telnetscript.telnetscript( '127.0.0.1', {}, 4242 )
ret = conn.RunScript( script.split( '\n' )).split( '\n' )
print ret[-2][6:]
Related Articles
Get the URL of the current Firefox session with Swift or Objective C
MacOSX or AppleScript: get the current Firefox URL
How do I view the current browser URL with ASPX NET c #?
Redirect to the current usable URL (with url or not)
How to save the current web page with casperjs / phantomjs?
Obtain a schema of the current request URL
Retrieving the current date and time from a time server
How to pass the current Gmail URL from Gmail
What is the advantage of URLs with semantically dead components?
Get the current TTY path in Python
Retrieve the current user connection in Sharepoint from a Silverlight application
How do I retrieve the current presenter in GWT or GWTP?
Ability to retrieve the actual raw URL for the Rails query?
How do I get the current Firefox profile path from my applet?
Recommend
-
6
Introduction Often when you are building applications using Express, you will need to get information from your users. Two of the most popular methods are URL parameters and POST parameters....
-
8
How to get current url Jquery vanilla Javascript Satinder Singh / January 09, 2021 /
-
8
Get the URL of the Current Displayed Page ...
-
11
Update current URL's query params non-destructively Couldn't find a modern example of how to upda...
-
4
How to Retrieve Emails Using IMAP in Python I am FSD (Full-stack developer) and I have expertise with Angular ,PHP, Node JS, Laravel, Codeigniter and front end. Location...
-
7
Get Current Tab URL From Chrome Extension in Go February 02, 2018 Build
-
4
How to get current page URL in PHP 1484 views 2 years ago PHP Use the PHP $_SERVER Superglobal Va...
-
5
How to Get the Current URL with JavaScript 1189 views 2 years ago Javascript Use the window.locat...
-
10
Laravel 8 Get Current URL With Parameters 4473 views 9 months ago Laravel Sometimes you might want to find the curr...
-
10
How to Get Current URL in Laravel 2415 views 10 months ago Laravel In blade files or Controllers, you may want to c...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK