How do I get the URLs out of an HTML file? <p>I need to get a long list of valid URLs for testing my DNS server. I found a web page that has a ton of links in it that would probably yield quite a lot of good links (http://www.cse.psu.edu/~groenvel/urls.html), and I figured that the easiest way to do this would be to download the HTML file and simply grep for the URLs. However, I can't get it to list out my results with only the link.</p> <p>I know there are lots of ways to do this. I'm not picky how it's done.</p> <p>Given the URL above, I want a list of all of the URLs (one per line) like this:</p> <blockquote> <p><a href="http://www.cse.psu.edu/~groenvel/" rel="nofollow">http://www.cse.psu.edu/~groenvel/</a><br> <a href="http://www.acard.com/" rel="nofollow">http://www.acard.com/</a><br> <a href="http://www.acer.com/" rel="nofollow">http://www.acer.com/</a><br> ... </p> </blockquote>