Created
August 27, 2026 07:28
-
-
Save undali/08ff220eb09b9bc6bd9daacbd4c9bbe8 to your computer and use it in GitHub Desktop.
Can inspect firefox session json saved/exported from 'Tab Session Manager' extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| from deepdiff import DeepDiff | |
| from datetime import datetime | |
| json1 = json.load(open("1.json")) | |
| json2 = json.load(open("2.json")) | |
| # Exclude value changes if you only want structural differences | |
| # diff = DeepDiff(json1, json2, ignore_order=True, report_repetition=False) | |
| # print(diff.pretty()) | |
| for session in json2: | |
| print('\n-----------' * 2) | |
| date = datetime.fromtimestamp(session['date'] / 1000.0) | |
| last_edit = datetime.fromtimestamp(session['lastEditedTime'] / 1000.0) | |
| session_start = datetime.fromtimestamp(session['sessionStartTime'] / 1000.0) | |
| print(f"session-id:{session['id']}\ntabs:{session['tabsNumber']}\nsession_0date:{date}\nsession_0edit:{last_edit}\nsession_start:{session_start} \n") | |
| for window_id, window in session['windows'].items(): | |
| print(f'tabs len: {len(window)}') | |
| # for tab_id, tab in window.items(): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment