Hacker News .hnnew | 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- hackernews.hn | grep -o http[^\"]*
Personally, I prefer curl because it writes to stdout per default:

  curl hackernews.hn | 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- hackernews.hn | grep -o 'title"><a href="[^"]*' | grep -o http.*




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

Search: