我想从一个网页中提取所有的URL我怎么能用nokogiri做到这一点?
例子:
<div class="heat"> <a href='http://example.org/site/1/'>site 1</a> <a href='http://example.org/site/2/'>site 2</a> <a href='http://example.org/site/3/'>site 3</a> </diV>
结果应该是一个列表:
l = ['http://example.org/site/1/', 'http://example.org/site/2/', 'http://example.org/site/3/'