News for hackers. Stuff that matters.
Re:Show HN: Export HN Favorites to a CSV File by amjd on Monday April 06, 2020 @12:46AM (#22790964)
I had written a Python script to get saved (upvoted) links as JSON / CSV a few years ago: https://github.com/amjd/HN-Saved-Links-Export

I'm not sure if it still works as it too relied on HTML scraping. Perhaps I should update it to support favorites too.

Edit: Whoa, it's been 4 years already. I believe HN didn't have favorite feature at the time. That's why I used upvoting as my bookmarks system and created a script to export that data.

Re:Show HN: Export HN Favorites to a CSV File by gabrielsroka on Monday April 06, 2020 @02:18AM (#22791281)
@amjd, thanks for sharing. I upgraded it from Python 2 to Python 3, but when I ran it, I got a 404 error on the `saved` endpoint. Does it work for you?

Edit: I see from the other PR it's called `upvoted`.

Edit 2: I changed it to `upvoted` and now I get a 200 OK, but the code crashed right afterwards on `tree.cssselect()`.

Re:Show HN: Export HN Favorites to a CSV File by amjd on Monday April 06, 2020 @06:09AM (#22792253)
It's four years old so the page HTML structure must have likely changed. I'll take a look at it when I'm free and update the script. Thanks for your PR, I'll review and merge the two open PRs as well.

Btw, good work on your JS solution. It's great that it just works without requiring any download or installation. :)