You want to keep track of the web pages opened in FF through Python. So, why don't you write a web proxy in Python and configure FireFox to use that web proxy.
After that you can filter all the HTTP requests that are emitted from Firefox through regular expression and store them in a file or database.