diff -r 9ea667baf097 -r dbe49327b6c5 progs/crawler3.scala --- a/progs/crawler3.scala Wed Aug 07 17:31:42 2013 +0100 +++ b/progs/crawler3.scala Tue Sep 24 01:12:36 2013 +0100 @@ -7,8 +7,8 @@ Source.fromURL(url).take(10000).mkString } catch { - case e => { - println(" Problem with: " + url) + case _ : Throwable => { + println(s" Problem with: $url") "" } } @@ -36,7 +36,7 @@ if (n == 0) () //else if (my_urls.findFirstIn(url) == None) () else { - println("Visiting: " + n + " " + url) + println(s"Visiting: $n $url") val page = get_page(url) println(email_pattern.findAllIn(page).mkString("\n")) for (u <- get_all_URLs(page)) crawl(u, n - 1)