0
Tcl/Tk中是否有一个函数来显示链接中所有可用的URL?我想开始编写具有一些功能的web爬行器。Tcl Tk显示所有可用链接
For example:
the user types this:
"www.testsite.com"
and he will get that:
"www.testsite.com/dir1/"
"www.testsite.com/dir2/"
e.g.
或者用像phyton这样的其他语言编程它会更好吗?
br
看来当我运行它针对我公司的Intranet头版工作,虽然我不认为如果文档有我会发布的链接列表... –
没有'href'属性的'a'元素(例如名字锚),可以使用'foreach href [$ doc selectNodes {// a/@ href}] {puts [lindex $ href end]}''。 –
@PeterLewerin我_think_ XPath在这种情况下最好是'// a [@href]';你不需要属性节点,你只是想指定它们在那里。 –