【发布时间】:2011-09-23 16:51:25
【问题描述】:
我正在尝试在 r 中编写一个函数,给定一个地址,它将返回该网页上的链接列表。
例如:
getLinks("http://prog21.dadgum.com/109.html")
会返回:
"http://prog21.dadgum.com/prog21.css"
"http://prog21.dadgum.com/atom.xml"
"http://prog21.dadgum.com/index.html"
"http://prog21.dadgum.com/archives.html"
"http://prog21.dadgum.com/atom.xml"
"http://prog21.dadgum.com/56.html"
"http://prog21.dadgum.com/39.html"
"http://prog21.dadgum.com/109.html"
"http://prog21.dadgum.com/108.html"
"http://prog21.dadgum.com/107.html"
"http://prog21.dadgum.com/106.html"
"http://prog21.dadgum.com/105.html"
"http://prog21.dadgum.com/104.html"
【问题讨论】:
标签: xml r web-scraping