
Export your Hacker News saved links to CSV using only Chrome console - thomaskcr
https://github.com/thomaskcr/hn-saved-export
======
CDokolas
Anyone 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
got 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
Thanks 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.

------
amjd
Good 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
Thanks, 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
FWIW, 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.

------
tnorthcutt
What puts a link on your saved links page? I'd never noticed that page before.

~~~
msh
Up voting it.

~~~
rafaelm
I 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
What's wrong with voting?

------
homero
I don't have a save button

~~~
amjd
Upvoting 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>)

------
wiseleo
Thanks, always was curious how to save localStorage into a CSV.

------
naklers
[https://github.com/HackerNews/API](https://github.com/HackerNews/API)

~~~
koolba
That doesn't give you access to saved stories. Saved stories are stories that
you voted on and are "private" to the user.

