firefox session recovery

Overview

Background

I’m what's known as a tab hoarder. At any given time I might have 100s of tabs open across multipe Firefox windows. I know some folks love to hate on firefox, but as one of the only mainstream browsers that is not controlled by a big (evil) tech corp with various privacy/monopolistic concerns, it's my default browser. It is a tad slower than some of the other browsers overall, but it makes it up with
amazing extensions and great developer experience.

I also love that Firefox lets me keep all my tabs running and backed-up. Even if Firefox crashes, it always recovers nicely, restoring all the tabs that were open when the browser crashed (the crashed sessions can be stored recursivly which is the best featrure). That is why this feature (i.e. managing crashed sessions/tabs) which chrome eventually copied (even though it's still not implmented as well as ff) has been my bread and butter and why I've stuck with Firefox all these years.

The Problem

Having said all that, once in a while (and I used to really dread those moments when it happened), firefox is not be able to resore my crashed session (which might have involed 1000s of tabs that I kept opened, hoping to bookmark at some point). I could never figure out why (probably the size of the session-restore file grows so big that Firefox can't process) and eventually there is nothing Firefox can do. And so you sit there with all your tabs potentially lost forever.

This issue has led many online to create their own tools to try and extract all those lost tabs (urls) manually. Once such popular tool is the Session History Scrounger which was written in javascript and runs in the browser. It has a great interface but it's slow and has mostly crashed in my use cases (my compressed session files can sometimes be as big as 100mb). As description on the tool says: "Firefox creates various session history files as you browse, and then at shutdown creates sessionstore.jsonlz4. In Firefox 56+, the files are compressed using Mozilla's flavor of LZ4 compression (.jsonlz4 or .baklz4 file extension). The JSON data contained in those compressed files contain a rich detail about your session" which can be used to extract the urls.

Solution

Given that this js implementation didn't work in my situation, I needed to come up with a solution which didn't crash if I needed to extract the urls from massive json files. Enter python and the rest is a simple script (developed through trial and error) which extracts all urls from the open tabs.

Usage

You can find the recovery files in the sessionstore-backups folder in the Firefox profile dir:

$FIREFOX_PROFILE/sessionstore-backups/recovery.jsonlz4

My script will work with either recovery.jsonlz4 or recovery.baklz4

To tun, just pass the file path to the python script and it will output a html file with all the tabs urls

$ ./recover.py recovery.jsonlz4 > done.html

In case you run into this error:

ModuleNotFoundError: No module named 'lz4

Just run

pip install lz4

Owner
Ahmad Sadraei
Ahmad Sadraei
Change your Windows background with this program safely & easily!

Background_Changer Table of Contents: About the Program Features Requirements Preview Credits Reach Me See Also About the Program: You can change your

Sina.f 0 Jul 14, 2022
redun aims to be a more expressive and efficient workflow framework

redun yet another redundant workflow engine redun aims to be a more expressive and efficient workflow framework, built on top of the popular Python pr

insitro 372 Jan 04, 2023
Open slidebook .sldy files in Python

Work in progress slidebook-python Open slidebook .sldy files in Python To install slidebook-python requires Python = 3.9 pip install slidebook-python

The Institute of Cancer Research 2 May 04, 2022
Irrigation Component V4 providing support for a custom card

Irrigation Component V4 This release sees the delivery of a custom card https://github.com/petergridge/irrigation_card to render the program options s

12 Oct 28, 2022
Cairo-math-64x61 - Fixed point 64.61 math library for Cairo / Starknet

Cairo Math 64x61 A fixed point 64.61 math library for Cairo & Starknet Signed 64

Influence 63 Dec 05, 2022
Gmvault: Backup and restore your gmail account

Gmvault: Backup and restore your gmail account Gmvault is a tool for backing up your gmail account and never lose email correspondence. Gmvault is ope

Guillaume Aubert 3.5k Jan 01, 2023
A Python module for decorators, wrappers and monkey patching.

wrapt The aim of the wrapt module is to provide a transparent object proxy for Python, which can be used as the basis for the construction of function

Graham Dumpleton 1.8k Jan 06, 2023
Enhanced version of blender's bvh add-on with more settings supported. The bvh's rest pose should have the same handedness as the armature while could use a different up/forward definiton.

Enhanced bvh add-on (importer/exporter) for blender Enhanced bvh add-on (importer/exporter) for blender Enhanced bvh importer Enhanced bvh exporter Ho

James Zhao 16 Dec 20, 2022
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent Of Code 2021 - Python English Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels th

Coral Izquierdo Muñiz 2 Jan 09, 2022
Data Science Course at Dept. of Computer Engineering, Chula 2022

2110446 Data Science Course at Chula 2022 Short links for exercises: Week1: Intro to Numpy, Pandas Numpy: https://colab.research.google.com/github/kao

Kao Panboonyuen 17 Nov 27, 2022
Interactive class notebooks for ECE4076 Computer Vision, weeks 1 - 6

ECE4076 Interactive class notebooks for ECE4076 Computer Vision, weeks 1 - 6. ECE4076 is a computer vision unit at Monash University, covering both cl

Michael Burke 9 Jun 16, 2022
The LiberaPay archive module for the SeanPM life archive project.

By: Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afrikaans | sq Shqiptare Albania

Sean P. Myrick V19.1.7.2 1 Aug 26, 2022
An extension for Arma 3 that lets you write extensions in Python 3

An Arma 3 extension that lets you to write python extensions for Arma 3. And it's really simple and straightforward to use!

Lukasz Taczuk 48 Dec 18, 2022
Objetivo: de forma colaborativa pasar de nodos de Dynamo a Python.

ITTI_Ed01_De-nodos-a-python ITTI. EXPERT TRAINING EN AUTOMATIZACIÓN DE PROCESOS BIM: OFFICIAL DE AUTODESK. Edición 1 Enlace al Master Enunciado: Traba

1 Jun 06, 2022
Генератор отчетов на Python с использованием библиотеки docx для работы с word-файлами и запросов к сервису

Генератор отчетов на Python с использованием библиотеки docx для работы с word-файлами и запросов к сервису

Semyon Esaev 2 Jun 24, 2022
This is the code of Python enthusiasts collection and written.

I am Python's enthusiast, like to collect Python's programs and code.

cnzb 35 Apr 18, 2022
A numbers extract from string python package

Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.com/FayasNoushad/Numbers-Extract/blob/main/LICENS

Fayas Noushad 4 Nov 28, 2021
A python program, imitating functionalities of a banking system

A python program, imitating functionalities of a banking system, in order for users to perform certain operations in a bank.

Moyosore Weke 1 Nov 26, 2021
A Python version of Canvacord

A copy of canvacord made in python! Table of contents Installation Examples Creating Images Links Downloads Installation Run any of these commands in

10 Mar 28, 2022
Заглушки .NET библиотек для IronPython

Код репозитория основан на ironpython-stubs. Выражаю gtalarico бесконечную благодарность за вклад в развитие сообщества разработчиков скриптов и плаги

12 Nov 23, 2022