Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you use Linux or some other Unix, you can also do it with standard Unix tools:

  wget -O- news.ycombinator.com | grep -o http[^\"]*
Personally, I prefer curl because it writes to stdout per default:

  curl news.ycombinator.com | grep -o http[^\"]*
(After posting this, i noticed that HN cuts * signs at the end of a message. So I have to add this text here, or the last * would not be displayed.)


This shows all urls on HN including images etc. whereas the original post demonstrates retrieving only linked articles


You can filter that with another grep for example:

  wget -O- news.ycombinator.com | grep -o 'title"><a href="[^"]*' | grep -o http.*




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: