pull/49/head
kunfei 5 years ago
parent 468daf86f4
commit 52153e825d
  1. 7
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt

@ -54,8 +54,11 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application) {
private fun loadContent(rssArticle: RssArticle, ruleContent: String) {
execute {
AnalyzeUrl(rssArticle.link, baseUrl = rssArticle.origin).getResponseAwait().body()
?.let { body ->
val analyzeUrl = AnalyzeUrl(rssArticle.link, baseUrl = rssArticle.origin)
val content = if (analyzeUrl.useWebView) {
analyzeUrl.getResultByWebView(rssArticle.origin).content
} else analyzeUrl.getResponseAwait().body()
content?.let { body ->
AnalyzeRule().apply {
setContent(
body,

Loading…
Cancel
Save