Hacker News Official API
21–30 of 138 posts
Re: Hacker News Official API
#22TIL that HN doesn't use a "proper" / persistent DB. I wonder then how HN handles data persistence. Is it as simple as creating write-ahead logs + checkpointing every some duration?
Re: Hacker News Official API
#23Re: Hacker News Official API
#24Wish API would show comment votes instead of only showing them up until 8 years ago when displaying them was turned off on the main site. Aside from allowing users to enable them via their on interface, do analysis, etc — it broke HN’s comment search based on comment popularity. Related: https://news.ycombinator.com/item?id=32535637
[1] https://github.com/superb-owl/hacker-news-comments
[2] https://superbowl.substack.com/p/commenting-on-hacker-news
Re: Hacker News Official API
#25I wrote a script that uses your browser cookies to scrape them from the website here: https://github.com/superb-owl/hacker-news-comments
Re: Hacker News Official API
#26Instead, try considering the (more unknown) Algolia API[0]. It supports fetching the entire tree in one request. Unfortunately the comments aren’t sorted, so you’ll still have to use the official one (or parse the HN HTML) if you need that.
For my HN client[1], I parse the HN HTML (as it’s required for voting), and sort the comments from the Algolia API. It’s much faster than recursively requesting the official API.
Re: Hacker News Official API
#27Wish API would show comment votes instead of only showing them up until 8 years ago when displaying them was turned off on the main site. Aside from allowing users to enable them via their on interface, do analysis, etc — it broke HN’s comment search based on comment popularity. Related: https://news.ycombinator.com/item?id=32535637
I’d like to be able to conveniently access my most popular comments. There are quite a few things in there that I might like to write longer-form articles about. ( https://james.darpinian.com/blog/scraping-my-own-hacker-news... gives one way of doing it, by crawling your /threads?id=‹username› page, which does contain the point counts for each comment by you.)
Re: Hacker News Official API
#28Firebase is owned by google. There are plenty of OSS solutions to create this exact realtime thing without getting too close to the elephant in the room.