Comment on Show HN: Submit to Hacker News | Browser ExtensionComments−codingdave1yThe 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, and parse that single result?−wbnnsOP1yThanks so much, I've just refactored to do exactly this, based on your comment: https://github.com/wbnns/submit-to-hacker-news/commit/1afd66...−wbnnsOP1yAdditional updates alongside the change: https://github.com/wbnns/submit-to-hacker-news/commit/d9e027...−wbnnsOP1yv1.4.0: https://github.com/wbnns/submit-to-hacker-news/releases/tag/...
Comments
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, and parse that single result?
Thanks so much, I've just refactored to do exactly this, based on your comment: https://github.com/wbnns/submit-to-hacker-news/commit/1afd66...
Additional updates alongside the change: https://github.com/wbnns/submit-to-hacker-news/commit/d9e027...
v1.4.0: https://github.com/wbnns/submit-to-hacker-news/releases/tag/...