Skip to content

Instantly share code, notes, and snippets.

@soshial
Created June 22, 2012 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soshial/2971507 to your computer and use it in GitHub Desktop.
Save soshial/2971507 to your computer and use it in GitHub Desktop.
Restoring Firefox session tabs from sessionstore.bak
import json,codecs
session_text = codecs.open( "sessionstore.bak", "r", "utf-8" ).read()
json = json.loads(session_text)
for i in range(len(json['_closedWindows'][0]['tabs'])):
print json['_closedWindows'][0]['tabs'][i]['entries'][-1]['url']
print 'done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment