-
-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
@Test
fun testGetVideoHotRank() {
val webClient = WebClient(BrowserVersion.CHROME)
webClient.options.isThrowExceptionOnScriptError = false
webClient.options.isThrowExceptionOnFailingStatusCode = false
webClient.options.isCssEnabled = true
webClient.options.isJavaScriptEnabled = true
webClient.ajaxController = NicelyResynchronizingAjaxController()
var page: HtmlPage? = null
try {
page = webClient.getPage("https://t.youku.com/yep/page/s/hot_search_rank")
} catch (e: Exception) {
e.printStackTrace()
} finally {
webClient.close()
}
webClient.waitForBackgroundJavaScript(30000)
val pageXml = page?.asXml()
println(pageXml.toString())
}
When visiting this site, it seems that the content is not displaying because the js is not loading.
Metadata
Metadata
Assignees
Labels
No labels