changeset 254 | dcd4688690ce |
parent 242 | 35104ee14f87 |
child 303 | 4439c56d96cf |
--- a/progs/crawler2.scala Sun Sep 21 17:40:04 2014 +0100 +++ b/progs/crawler2.scala Sun Sep 21 23:23:43 2014 +0100 @@ -17,9 +17,8 @@ def unquote(s: String) = s.drop(1).dropRight(1) -def get_all_URLs(page: String) : Set[String] = { +def get_all_URLs(page: String) : Set[String] = http_pattern.findAllIn(page).map(unquote).toSet -} def crawl(url: String, n: Int) : Unit = { if (n == 0) ()