8 ms·
The HN API is not efficient - it says so itself in its readme. Which means neither is this. Making 1000+ HTTP requests to dupe check feels kind of insane when a
by codingdave 1y ago
The HN API is not efficient - it says so itself in its readme. Which means neither is this. Making 1000+ HTTP requests to dupe check feels kind of insane when all you are doing is URL comparisons.
Why not instead make a single call to: https://news.ycombinator.com/from?site=whateverdomain.com https://news.ycombinator.com/from?site=whateverdomain.com, and parse that single result?
- wbnns 1y agoThanks so much, I've just refactored to do exactly this, based on your comment: https://github.com/wbnns/submit-to-hacker-news/commit/1afd667b1f83f3808254f0ebadfac5fbda54f75f https://github.com/wbnns/submit-to-hacker-news/commit/1afd66...
- wbnns 1y agoAdditional updates alongside the change: https://github.com/wbnns/submit-to-hacker-news/commit/d9e027d1fb68bcb326d57f99f60623f7f19f820a https://github.com/wbnns/submit-to-hacker-news/commit/d9e027...
- wbnns 1y agov1.4.0: https://github.com/wbnns/submit-to-hacker-news/releases/tag/v1.4.0 https://github.com/wbnns/submit-to-hacker-news/releases/tag/...