progs/crawler2.scala
changeset 303 4439c56d96cf
parent 254 dcd4688690ce
child 399 5c1fbb39c93e
equal deleted inserted replaced
302:0fa7b4221745 303:4439c56d96cf
    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 // can now deal with depth 3 and beyond
    39 // can now deal with depth 3 and beyond
    39 crawl(startURL, 3)
    40 crawl(startURL, 2)
    40 
    41 
    41 
    42