![]() Combining the commands withīash expansion results in the following: sed -n "$(python2 <<< $'import json\nf = open("/home/username/.mozilla/firefox/RANDOM.profile/sessionstore.js", "r")\njdata = json.loads(f.read())\nf.close()\nprint str(jdata)')p" <(python2 <<< $'import json\nf = open("/home/username/.mozilla/firefox/RANDOM.profile/sessionstore.js", "r")\njdata = json.loads(f.read())\nf.close()\nfor win in jdata.get("windows"):\n\tfor tab in win.get("tabs"):\n\t\ti = tab.get("index") - 1\n\t\tprint tab.get("entries"). In DevTools, click the Application tab to open the Application tool. sed -n "3p" file prints line 3 from file. Printing that line number from all open tab url's gives you the current open Get the current active/open tab number: python2 <<< $'import json\nf = open("/home/username/.mozilla/firefox/RANDOM.profile/sessionstore.js", "r")\njdata = json.loads(f.read())\nf.close()\nprint str(jdata)' Get all the open tabs: python2 <<< $'import json\nf = open("/home/username/.mozilla/firefox/RANDOM.profile/sessionstore.js", "r")\njdata = json.loads(f.read())\nf.close()\nfor win in jdata.get("windows"):\n\tfor tab in win.get("tabs"):\n\t\ti = tab.get("index") - 1\n\t\tprint tab.get("entries").get("url")' With this referral link you'll get $100 credit for 60 days. You can also sponsor me by getting a Digital Ocean VPS. Though the sessionstore.bak file is 13Ko big and seems to contain all the links of my previous session. It means the world to me if you show your appreciation and you'll help pay the server costs. I saved the sessionstore.bak into another folder, closed mozilla, changed the extension bak to js in the 'profiles' folder of firefox and opened it again but nothing happened. The first one will get the HTML from a URL using the same library as earlier but wrapping it in a try block for security. As their names imply, each of them will perform one of the main tasks of web scraping. Go check it out!Ĭonsider sponsoring me on Github. For that, we'll create three helper functions: get HTML, extract links, and extract content. Drag and drop one session history file onto the empty text box (. ![]() User-level configuration items will only take effect for the specified users, and will not affect the. I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |