progs/app1.scala
author Christian Urban <urbanc@in.tum.de>
Wed, 16 Oct 2019 11:14:53 +0100
changeset 659 fe1f9c2e3c5b
parent 559 893e756e18f5
permissions -rw-r--r--
optional

def get_page(url: String) : String = {
 Try(Source.fromURL(url)("ISO-8859-1").take(10000).mkString).
    getOrElse { println(s"  Problem with: $url"); ""}
}