Skip to main content

Firefox profile

Copyright 2020 Luís Gomes luismsgomes@gmail.com, all rights reserved.

Installation

pip3 install firefox-profile

Usage from Python

from firefox_profile import FirefoxProfile

for profile in FirefoxProfile.get_profiles():
    recovery_data = profile.get_recovery_data()
    if recovery_data is None:
        continue
    for i, window in enumerate(recovery_data.windows):
        # do something with window:
        print(f"window {i}")
        print(f"  workspace: {window.workspace}")
        print(f"  zindex: {window.zindex}")
        print(f"  size: {window.size!r}")
        print(f"  position: {window.position!r}")
        print(f"  mode: {window.mode}")
        print(f"  tabs:")
        for j, tab in enumerate(window.tabs):
            # do something with tab:
            print(f"    tab {j}")
            print(f"      url: {tab.url}")
            print(f"      title: {tab.title}")
            print(f"      last_accessed: {tab.last_accessed}")

Usage from command line

firefox-profile-json

Will output something like:

[
    {
        "profile": "default",
        "windows": [
            {
                "tabs": [
                    {
                        "last_accessed": "2020-12-07T17:16:19.703000",
                        "url": "https://docs.python.org/3/library/os.html#os.open",
                        "title": "os \u2014 Miscellaneous operating system interfaces \u2014 Python 3.9.1rc1 documentation"
                    }
                ]
            }
        ],
        "workspace": "2",
        "zindex": 3,
        "size": [
            1716,
            1373
        ],
        "position": [
            0,
            37
        ],
        "mode": "minimized"
    }
]

License

This software is licensed under the MIT license.

https://opensource.org/licenses/MIT

Metadata

Release files for firefox-profile 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for firefox-profile 0.0.3
File Size Uploaded
firefox-profile-0.0.3.tar.gz 3.5 kB Details

Release files / firefox-profile-0.0.3.tar.gz

Download URL firefox-profile-0.0.3.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
82684a2f7629495d9097f42b5a9aa714d28f48432b23f44d534c3a58d89f565d
BLAKE2b-256 checksum
How to use checksums
d7f1847c8d8ee1c08440c825d4bc87631420bb154bb410c166d28903a749b8a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page