当前位置: 动力学知识库 > 问答 > 编程问答 >

download - Is it possible to generate a list of urls in a page?

问题描述:

I need something like firefox's downthemall but without downloading the files, just exporting a list of urls to a txt file.

Anybody knows of a browser plugin or a standalone app that does it?

thanks.

网友答案:

You may use the "lynx" command and then parse its result this way:

[email protected]:~$ LC_ALL=C lynx -dump http://www.google.it |awk 'NR==1,/References/{next};{print $2}'

http://www.google.it/imghp?hl=it&tab=wi
http://video.google.it/?hl=it&tab=wv
http://maps.google.it/maps?hl=it&tab=wl
http://news.google.it/nwshp?hl=it&tab=wn
http://www.google.it/shopping?hl=it&tab=wf
https://mail.google.com/mail/?tab=wm
http://www.google.it/intl/it/options/
http://www.google.it/url?sa=p&pref=ig&pval=3&q=http://www.google.it/ig%3Fhl%3Dit%26source%3Diglk&usg=AFQjCNGj0rOYdXuivAAnOmwpag3BjbWBFg
http://www.google.com/history/optout?hl=it
http://www.google.it/preferences?hl=it
https://accounts.google.com/ServiceLogin?hl=it&continue=http://www.google.it/
http://www.google.it/advanced_search?hl=it
http://www.google.it/language_tools?hl=it
https://www.google.com/intl/it/policies/#utm_source=googlehp&utm_medium=hpp&utm_campaign=it_all-hpp_pp
http://www.google.it/intl/it/ads/
http://www.google.it/services/
http://www.google.it/intl/it/about.html
http://www.google.com/ncr
http://www.google.it/intl/it/privacy.html
分享给朋友:
您可能感兴趣的文章:
随机阅读: