Created
April 22, 2009 02:36
-
-
Save alandipert/99548 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private def getBookList(url: String): List[Book] = { | |
var books = List[Book](); | |
(ConstructingParser.fromSource(Source.fromURL(url), false) .document() | |
.docElem\\ "Item") | |
.foreach((item: Node) => { | |
books = new Book( | |
(item \ "ItemAttributes" \ "Title").text, | |
(item \ "ASIN").text | |
) :: books | |
}); | |
return books | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment