117 hours would take to get IDs of 81300 stories posted since August
Currently I learn to analyse HN posts (stories to be precise)
At the moment of writing 849451 items have been posted since 29th of August (IDs between 21682006 and 20832555).
Among those only 81300 are stories (HN’s term for post).
To find out which you could use HackerNews API and fetch every of 849451 items and check if it’s a story for 117 hours (assuming 2 requests per second).
Or periodically fetch endpoint which dumps IDs of last 500 stories (it would take 38 minutes to find these IDs by going backwards from last item, in my case 21682006 - 21677389 = 4617 items to check)
Back in the end of August I’ve set a script that gets those 500 IDs every two hours and saves new ones.
1 comment
[ 1.4 ms ] story [ 12.1 ms ] threadCurrently I learn to analyse HN posts (stories to be precise)
At the moment of writing 849451 items have been posted since 29th of August (IDs between 21682006 and 20832555).
Among those only 81300 are stories (HN’s term for post).
To find out which you could use HackerNews API and fetch every of 849451 items and check if it’s a story for 117 hours (assuming 2 requests per second).
Or periodically fetch endpoint which dumps IDs of last 500 stories (it would take 38 minutes to find these IDs by going backwards from last item, in my case 21682006 - 21677389 = 4617 items to check)
Back in the end of August I’ve set a script that gets those 500 IDs every two hours and saves new ones.