progs/crawler2.scala
changeset 415 4ae59fd3b174
parent 399 5c1fbb39c93e
child 421 7a04f2c532c1
equal deleted inserted replaced
414:065ca01b62ae 415:4ae59fd3b174
    31     for (u <- get_all_URLs(get_page(url))) crawl(u, n - 1)
    31     for (u <- get_all_URLs(get_page(url))) crawl(u, n - 1)
    32   }
    32   }
    33 }
    33 }
    34 
    34 
    35 // starting URL for the crawler
    35 // starting URL for the crawler
    36 //val startURL = """http://www.inf.kcl.ac.uk/staff/urbanc"""
    36 val startURL = """http://www.inf.kcl.ac.uk/staff/urbanc"""
    37 val startURL = """http://www.inf.kcl.ac.uk/staff/urbanc/msc-projects-14.html"""
    37 
    38 
    38 
    39 // can now deal with depth 3 and beyond
    39 // can now deal with depth 3 and beyond
    40 crawl(startURL, 2)
    40 crawl(startURL, 2)
    41 
    41 
    42 
    42