[HN Gopher] Show HN: Export HN Favorites to a CSV File ___________________________________________________________________ Show HN: Export HN Favorites to a CSV File I wrote a short JavaScript snippet to export HN Favorites to a CSV file. It runs in your browser like a browser extension. It scrapes the HTML and navigates from page to page. Setup and usage instructions are in the file. Check out https://gabrielsroka.github.io/getHNFavorites.js or to view the source code, see getHNFavorites.js on https://github.com/gabrielsroka/gabrielsroka.github.io Author : gabrielsroka Score : 92 points Date : 2020-04-05 20:08 UTC (2 hours ago) | abdullahkhalids wrote: | What is HN's GDPR compliant way of requesting a copy of all | stored data? Email dang? | simonw wrote: | It's a shame favorites aren't exposed in the official HN API: | https://github.com/HackerNews/API - this is a smart workaround. | gabrielsroka wrote: | Thanks Simon. I'd originally written this script to export my | DVD ratings from Netflix, since there's no API for that either. | It was easy to adapt it to HN. | | I wanted to show people that it's possible (and easy) to get to | your own data! | dang wrote: | Our plan is for the next version of HN's API to simply serve a | JSON version of every page. I'm hoping to get to that this | year. | bhl wrote: | Are there plans for an export tool, e.g. a user downloading | all their comments and upvoted submissions? I tend to use the | submission upvote button more than the favorite one, and an | export tool wouldn't require a user API key for non-private | info. | death-by-ppt wrote: | Hi Dan, | | That's great news! Is there a way to be notified (eg, via | email) when this comes out? | | Thanks. | dang wrote: | If you (or anyone) want to be on an alpha-tester list, | email hn@ycombinator.com and we can add you. Send a | username and make sure it has the email address you want to | be notified at. | simonw wrote: | That would be amazing! | | I've been having some fun with the API recently building this | tool: https://github.com/dogsheep/hacker-news-to-sqlite | dvfjsdhgfv wrote: | This is smart. I'm adding this to my HN favorites. | gabrielsroka wrote: | Thanks dvfjsdhgfv. If there's sufficient interest, I can easily | turn it into a Chrome extension. | | (Edit: haha, I see what you just did there. A little recursive | humor.) | sbr464 wrote: | I made an API for favorites a while back. | | https://github.com/reactual/hacker-news-favorites-api | | Here's an example query: | https://reactual.api.stdlib.com/hnfavs/?id=sbr464&limit=1 | gabrielsroka wrote: | Ok, now that's really smart! | | Would a client using your API paginate to fetch, say, 50 pages? | When I tried it using ?limit=50, I got a 504 error. | | Thanks! | | (Edit, never mind, I see you explain it in the readme.) | sbr464 wrote: | I had made it pretty quickly, the limit would be too large, | thats 50*30, you may need to provide an offset and make a few | requests. ___________________________________________________________________ (page generated 2020-04-05 23:00 UTC)