If you're a Ubuntu user, or similar, you should be able to find the latest backup at
~/.mozilla/firefox/ro51nwle.default/sessionstore-backups/upgrade.jsonlz4-[timestamp of upgrade]
I didn't know anything about the file format, but this gist was basically enough to get me started
With the gist saved to the backup folder, you can export to json with:
$ sudo pip3 install lz4
$ python3 ./mozlz4a.py -d upgrade.jsonlz4-[timestamp of backup] backup.js
There's a lot of data in there (including each tab's entire history) but at least it's not lost!
If you just want to save the most recent url from each tab like I did, something like the following python should do the job:
#!/usr/bin/env python3
import json
with open('backup.js') as infile:
read_data = infile.read()
json_data = json.loads(read_data)
tab_groups = json.loads(json_data['windows'][0]['extData']['tabview-group'])
groups = {int(k): {'title': tab_groups[k]['title'], 'tabs': []} for k in tab_groups.keys()}
for tab in json_data['windows'][0]['tabs']:
url = tab['entries'][-1]['url']
group_id = json.loads(tab['extData']['tabview-tab'])['groupID']
groups[group_id]['tabs'].append(url)
with open('tabs_backup.json', 'w') as outfile:
json.dump(groups, outfile, indent=4)