Ask HN: Can I filter submissions by domain TLD?
I’d like to filter the HN submissions where the provided URL ends in .fr, to find blogs or personal websites of Frenchies. Is that possible?
I tried the obvious /from?site=*.fr but it doesn’t seem to be available
4 comments
[ 4.9 ms ] story [ 15.8 ms ] threadhttps://news.ycombinator.com/from?site=bbc.co.uk
but each TLD/subdomain have a different level of granularity.
It would be nice that if
https://news.ycombinator.com/from?site=co.uk
https://news.ycombinator.com/from?site=uk
also work and include all the subdomains.
Try sending a feature request to the mods hn@ycombinator.com . (They usually reply very soon, but new features may take more time to be implemented, assuming they like them.)
Or https://hn.algolia.com/api/v1/search_by_date?query=.fr/&rest...
See restrictSearchableAttributes=url in https://hn.algolia.com/api
Then maybe some JavaScript:
The results aren't perfect. You could do more filtering on the client side.https://jsfiddle.net/hoyxL3u0/