|
|
|
@ -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, |
|
|
|
|