Live data from Hacker News

Downloading All of Hacker News Posts and Comments

shitalshah.com

11–20 of 43 posts

Re: Downloading All of Hacker News Posts and Comments

#11
post #9
post #7

Earlier quoted context omitted.

Lots and lots of stories never make it anywhere near the front page. Mostly spam.

But I think the spam is caught and doesn't register through the api...

Stories which are dead will not show in the API, that's correct. But the proportion of submissions that make it to the front page / get any comments is very low. (<10%)

Re: Downloading All of Hacker News Posts and Comments

#12
post #2

Awesome, this will be super useful for running ML experiments on the HN stories. Previously, Max Woolf worked on this http://minimaxir.com/2014/02/hacking-hacker-news/ via https://news.ycombinator.com/item?id=7291531

I did, and with that, I had also included that Python code in GitHub, which uses the same implementation as the OP: https://github.com/minimaxir/hacker-news-download-all-storie... Fun fact: At 10,000 calls/hour and 1,000 objects per request, you can download all stories AND comments in less than an hour. As an aside: I tried to use ML on Hacker News stories and have had exactly zero success. (i.e. the predictive mode…

If you prefer the Python approach, I have forked minimaxir's code to work for comments:

https://github.com/jaredsohn/hacker-news-download-all-commen...

I have a few other things in the works related to the hnsearch API (had them almost ready for release a few months ago but then I got distracted); this post is persuading me to finish them up soon. :)

Re: Downloading All of Hacker News Posts and Comments

#13
post #2

Awesome, this will be super useful for running ML experiments on the HN stories. Previously, Max Woolf worked on this http://minimaxir.com/2014/02/hacking-hacker-news/ via https://news.ycombinator.com/item?id=7291531

I did similar analysis here http://karpathy.ca/myblog/?p=559 but it's a little less clean presentation.

I'm quite excited about this data release- there are many interesting ML models that could be trained here. One I hacked on previously on my own data was a comment ranker which uses a ranking loss to rank comments consistent with their observed order in data (which roughly reflects their number of upvotes, I believe). In principle I think it could be converted to a browser extension that gives a score for how well received your comment will be conditioned on the parent comment, as you write it in the text box. One of the main issues I ran into when I hacked a bit on it was space complexity, since you need to keep all the word embeddings (usually on order of 50-200D / word) around in memory of the extension, and there are many words.

Re: Downloading All of Hacker News Posts and Comments

#14
post #10
post #4

Your "Stories Download URL" is the same as the "Comments Download URL".

Easy fix, just change comments in the url to stories.

I imagine the point of that comment was to suggest that the OP fixes it to make it easier for others.

Re: Downloading All of Hacker News Posts and Comments

#16
post #2

Awesome, this will be super useful for running ML experiments on the HN stories. Previously, Max Woolf worked on this http://minimaxir.com/2014/02/hacking-hacker-news/ via https://news.ycombinator.com/item?id=7291531

I also did topic modeling (LDA) and other experiments on HN, code for fetching all posts and comments, and for topic modeling, can be found here: https://github.com/SnippyHolloW/HN_stats (lein run // look at hn.py)

Re: Downloading All of Hacker News Posts and Comments

#20

Have you considered sharing the data as a torrent? The current FileDropper speed is quite low (~200KB/s) P.S. Thanks for the data, you saved a good amount of our time.

magnet:? xt=urn:btih:A3E2200A9A99906476E2E88CA002477219A3C2C3&dn=HN&tr= udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp% 3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftr acker.ccc.de%3a80%2fannounce
Post reply on HN