3 ms·
Thanks a bunch for this. This somewhat works. This is not an ideal solution as the length of the first "section" will be variable as they depend on how many pe
by rg111 5y ago
Thanks a bunch for this. This somewhat works.
This is not an ideal solution as the length of the first "section" will be variable as they depend on how many people chose to write URLs on their posts that contain the site string.
If I cannot find a better solution, I will live with this. I will randomly pick up a page and click on that- if all the results are text posts on HN, I will go further right. If they appear to be links, then I will go left until I find the first one- like a sorting algorithm.
Thanks, anyway.
- gabrielsroka 5y agoCheck the API docs https://hn.algolia.com/api https://hn.algolia.com/api for restrictSearchableAttributes=url So maybe https://hn.algolia.com/api/v1/search?query=newyorker.com/&restrictSearchableAttributes=url https://hn.algolia.com/api/v1/search?query=newyorker.com/&re... See also my two posts here https://news.ycombinator.com/item?id=30331893 https://news.ycombinator.com/item?id=30331893
- rg111 5y agorestrictSearchableAttributes=url did not work without the API search. The links in text stories are also recognised as url, and that is reflected here. https://hn.algolia.com/?q=newyorker.com&restrictSearchableAttributes=url Was my query and it made no external difference. But when I tried directly accessing the API, it worked and threw me a JSON.
- gabrielsroka 5y agoCorrect. I'm talking about using the API, and I included a link to some client code and also a bookmarklet.