@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.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too