pull/37/head
kunfei 5 years ago
parent f1063bac0e
commit c4a950b039
  1. 2
      app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt
  2. 2
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt

@ -27,7 +27,7 @@ object RssParserByRule {
} else { } else {
val articleList = mutableListOf<RssArticle>() val articleList = mutableListOf<RssArticle>()
val analyzeRule = AnalyzeRule() val analyzeRule = AnalyzeRule()
analyzeRule.setContent(xml) analyzeRule.setContent(xml, rssSource.sourceUrl)
var reverse = true var reverse = true
if (ruleArticles.startsWith("-")) { if (ruleArticles.startsWith("-")) {
reverse = false reverse = false

@ -51,7 +51,7 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application) {
AnalyzeUrl(it, baseUrl = rssArticle.origin).getResponseAsync().await().body() AnalyzeUrl(it, baseUrl = rssArticle.origin).getResponseAsync().await().body()
?.let { body -> ?.let { body ->
AnalyzeRule().apply { AnalyzeRule().apply {
setContent(body) setContent(body, NetworkUtils.getAbsoluteURL(rssArticle.origin, it))
getString(ruleContent)?.let { content -> getString(ruleContent)?.let { content ->
contentLiveData.postValue(content) contentLiveData.postValue(content)
} }

Loading…
Cancel
Save