scala/app3.scala
changeset 92 e85600529ca5
parent 7 73cf4406b773
equal deleted inserted replaced
91:47f86885d481 92:e85600529ca5
       
     1 val my_urls = """urbanc""".r
       
     2 
       
     3 def crawl(url: String, n: Int) : Unit = {
       
     4   if (n == 0) ()
       
     5   else if (my_urls.findFirstIn(url) == None) ()
       
     6   else {
       
     7     println("Visiting: " + n + " " + url)
       
     8     for (u <- get_all_URLs(get_page(url))) crawl(u, n - 1)
       
     9   }
       
    10 }