as.soup.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dispatch-jsoup_2.9.0-1 Show documentation
Show all versions of dispatch-jsoup_2.9.0-1 Show documentation
Dispatch module providing jsoup html parsing support
The newest version!
package dispatch.as.jsoup
import org.jsoup.Jsoup
import org.jsoup.nodes
import com.ning.http.client.Response
object Document extends (Response => nodes.Document) {
def apply(r: Response) =
(dispatch.as.String andThen Jsoup.parse)(r)
}
object Query {
import org.jsoup.select.Elements
def apply(query: String): Response => Elements =
Document(_).select(query)
}
object Clean {
import org.jsoup.safety.Whitelist
def apply(wl: Whitelist): Response => String =
{ r => Jsoup.clean(dispatch.as.String(r), wl) }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy