4 ms·
Export your Hacker News saved links to CSV using only Chrome console
- CDokolas 10y agoAnyone find a way to do this in Firefox as well? It seems to work; except, it won't save the data in CSV. I'll try to get the raw JSON data...
- CDokolas 10y agogot it working with the following: window.location=window.URL.createObjectURL(new Blob([localStorage.getItem('hn_saved')],{type:'x-whatever/x-backup'})); file name is weird (I'm a JS newb!)
- thomaskcr 10y agoThanks for sharing, I figured there would be some type of issue with the download portion in other browsers. I'll see if that works in Chrome too and then maybe edit so more people can use it out of the box.
- tnorthcutt 10y agoWhat puts a link on your saved links page? I'd never noticed that page before.
- msh 10y agoUp voting it.
- rafaelm 10y agoI really wish there was a way to save a link for later reading without up voting. Sometimes I'm on my phone, see an interesting title I can't read right at the moment, but feel weird about upvoting it without actually reading it first. I've tried using read-it-later apps, but that works mostly for the articles and not the comments on HN which I find just as important.
- UniZero 10y agoWhat's wrong with voting?
- witty_username 10y agoJust bookmark the link.
- naklers 10y agohttps://github.com/HackerNews/API https://github.com/HackerNews/API
- koolba 10y agoThat doesn't give you access to saved stories. Saved stories are stories that you voted on and are "private" to the user.
- homero 10y agoI don't have a save button
- amjd 10y agoUpvoting a story adds it to your saved links. You can access your saved links here: https://news.ycombinator.com/saved?id=<username> https://news.ycombinator.com/saved?id=<username>
- amjd 10y agoGood work OP! I have been meaning to write a python script to do this for a while now. However, entering the code for each page may soon get tedious. (I have 88 pages of saved links.) I'll probably get down to writing that script anyway and share here when I'm done with it. :)
- thomaskcr 10y agoThanks, there are obviously much better ways to do this (even something like GreaseMonkey over using the console), I was going more for an optimization of total time invested. It takes less than 5 seconds per page, so you could probably still swing doing 88 in less than 10 mins pretty easily.
- santa_boy 10y agoFWIW, I had to do something similar and used http://inorganik.github.io/debugout.js/ http://inorganik.github.io/debugout.js/ It worked really well and using jQuery (inject it) make the code really simple to write.
- wiseleo 10y agoThanks, always was curious how to save localStorage into a CSV.