site=x.com/paulg doesn’t work though, so apparently site=domain.com/path only works for certain domains.
I just discovered this, and embarrassingly emailed Dan asking whether kind=comment was broken since I didn’t understand what I was looking at. Was this announced somewhere and I missed it?
AnimalMuppet•1h ago
A bit off topic, but: Is there a way to get my comments, sorted by most popular? news.ycombinator.com/threads:id=AnimalMuppet... and then what?
Or do I want something other than "threads" there, since I could accept just my comments, rather than the whole comment thread.
sillysaurusx•54m ago
Unfortunately no, not to my knowledge. Only your account can see how many points your comment has, so the only way to build this would be to scrape your comments (10 at a time) from /threads?id=AnimalMuppet and then sort them by points yourself. Which is impractical, sadly.
AnimalMuppet•1m ago
But why impractical? That's just a wget loop, right? Or is it the sort part that you think is impractical? That's just a matter of writing a perl (or whatever) script to pull out the IDs plus upvotes, sort by upvotes, and grab the IDs. Then you can use grep or whatever to find which files those IDs wound up in and extract the comments.
I mean, that's more work than I'm going to do for a vanity project, but I could...
sillysaurusx•1h ago
For example, to see all comments containing links to x.com:
https://news.ycombinator.com/from?site=x.com&kind=comment
Or all GitHub links:
https://news.ycombinator.com/from?site=github.com&kind=comme...
Remarkably it matches subdomains too. Here’s all gists posted to HN:
https://news.ycombinator.com/from?site=gist.github.com&kind=...
The submitted url shows all HN links posted to HN (i.e. comments containing news.ycombinator.com):
https://news.ycombinator.com/from?site=news.ycombinator.com&...
Note that this is distinct from showing comments with links to ycombinator.com, which doesn’t show links to HN:
https://news.ycombinator.com/from?site=ycombinator.com&kind=...
I find this impressive, since it’s not merely matching text (otherwise site=ycombinator.com would also show HN links).
You can even set site=github.com/antirez to find comments with links to antirez’s repos:
https://news.ycombinator.com/from?site=github.com/antirez&ki...
site=x.com/paulg doesn’t work though, so apparently site=domain.com/path only works for certain domains.
I just discovered this, and embarrassingly emailed Dan asking whether kind=comment was broken since I didn’t understand what I was looking at. Was this announced somewhere and I missed it?