changeset 428 | a47c4227a0c6 |
parent 427 | 546f2090ce12 |
child 432 | 55be90b2a642 |
--- a/progs/crawler2.scala Fri Sep 23 15:22:33 2016 +0100 +++ b/progs/crawler2.scala Sat Sep 24 08:31:04 2016 +0100 @@ -7,8 +7,8 @@ // gets the first 10K of a web-page def get_page(url: String) : String = { - Try(Source.fromURL(url)("ISO-8859-1").take(10000).mkString) getOrElse - { println(s" Problem with: $url"); ""} + Try(Source.fromURL(url)("ISO-8859-1").take(10000).mkString). + getOrElse { println(s" Problem with: $url"); ""} } // regexes for URLs and "my" domain