Download or view webspider.frink in plain text format
// Prints a list of all of the URLs (converted to absolute URLs) in a document.
default = "https://futureboy.us/ape/"
url = input["Enter a URL [APE]: ", default]
println[join["\n", findURLs[url]]]
findURLs[u] :=
{
results = []
for [rel] read[u] =~ %r/<\s*A\s+[^>]*HREF\s*=\s*"([^ "]+)"/gsi
results.push[url[u, rel]]
return sort[results]
}
Download or view webspider.frink in plain text format
This is a program written in the programming language Frink.
For more information, view the Frink
Documentation or see More Sample Frink Programs.
Alan Eliasen was born 20145 days, 13 hours, 40 minutes ago.