How to convert bookmarks.html to simple list of websites formated http://www.site.ext
How to convert my bookmarks that I back-up from Firefox (bookmarks.html), into a simple text document (like Word) that lists each bookmark in the simple text format (like http://mywebsite.com)? Bookmarks.html lists the bookmark like links, by their title (Mywebsite) and it is not what I need. Thank you.
الحل المُختار
This is sort of "quick and dirty" but you could give it a try:
(1) Open your bookmark.html file in a tab
(2) Open the web console in the lower part of the tab. Either:
- Ctrl+Shift+k
- "3-bar" menu button > Developer > Web Console
(3) Paste the following script in the bottom line of the console (to the right of the >> symbol) and press Enter to run it:
var aels=document.querySelectorAll("a[href]");
for (var i=0; i<aels.length; i++) aels[i].parentNode.outerHTML = "<p>"+aels[i].href+"</p>";
var dds=document.querySelectorAll("dd");
for (var i=0; i<dds.length; i++) dds[i].outerHTML="";
The links in the page should be replaced with plain URLs.
(4) Copy / paste the modified contents of the page to a text file or a Word document.
Read this answer in context 👍 3All Replies (4)
To open the Bookmarks Manager, press the Alt or F10 key bring up the tool bar, and select Bookmarks. Hot key is <Control>(Mac=<Command>) <Shift> B.
Once the window is open, at the top of the page, press the button labeled Import and Backup. Select Export Bookmarks To HTML, and follow the prompts and save it to a HTML file.
Thank you for your answer but you misread me: I know how to export my bookmarks to html. What I want is a list of website addresses formatted in text like http://mywebsite.com and not a list of titles formatted as links like The best website for quilter I don't want to have to click on the link and copy the address in the address bar, I wish the direct addresses listed on my file.
الحل المُختار
This is sort of "quick and dirty" but you could give it a try:
(1) Open your bookmark.html file in a tab
(2) Open the web console in the lower part of the tab. Either:
- Ctrl+Shift+k
- "3-bar" menu button > Developer > Web Console
(3) Paste the following script in the bottom line of the console (to the right of the >> symbol) and press Enter to run it:
var aels=document.querySelectorAll("a[href]");
for (var i=0; i<aels.length; i++) aels[i].parentNode.outerHTML = "<p>"+aels[i].href+"</p>";
var dds=document.querySelectorAll("dd");
for (var i=0; i<dds.length; i++) dds[i].outerHTML="";
The links in the page should be replaced with plain URLs.
(4) Copy / paste the modified contents of the page to a text file or a Word document.
Thank you very much Mr. Jscher2000! It worked! I still don't understand why there is no folder of favorites in the folder Firefox, so we can order our favorites easily and quickly, but you helped me with your code to research websites the way I want. Thank you again and cheer for your 5277th solution!
Modified