3 ms·
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 https://github.com/amjd/
by amjd 7y ago
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 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.
- gabrielsroka 7y ago@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()`.
- amjd 7y agoIt'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. :)