diff --git a/app/src/main/java/io/legado/app/model/rss/RssParser.kt b/app/src/main/java/io/legado/app/model/rss/RssParser.kt index 6a3508aab..22dbfdf32 100644 --- a/app/src/main/java/io/legado/app/model/rss/RssParser.kt +++ b/app/src/main/java/io/legado/app/model/rss/RssParser.kt @@ -2,6 +2,7 @@ package io.legado.app.model.rss import io.legado.app.constant.RSSKeywords import io.legado.app.data.entities.RssArticle +import io.legado.app.model.Debug import org.xmlpull.v1.XmlPullParser import org.xmlpull.v1.XmlPullParserException import org.xmlpull.v1.XmlPullParserFactory @@ -98,6 +99,20 @@ object RssParser { articleList.reverse() for ((index: Int, item: RssArticle) in articleList.withIndex()) { item.order = System.currentTimeMillis() + index + if (index == 0) { + Debug.log(sourceUrl, "┌获取标题") + Debug.log(sourceUrl, "└${item.title}") + Debug.log(sourceUrl, "┌获取时间") + Debug.log(sourceUrl, "└${item.pubDate}") + Debug.log(sourceUrl, "┌获取类别") + Debug.log(sourceUrl, "└${item.categories}") + Debug.log(sourceUrl, "┌获取描述") + Debug.log(sourceUrl, "└${item.description}") + Debug.log(sourceUrl, "┌获取图片url") + Debug.log(sourceUrl, "└${item.image}") + Debug.log(sourceUrl, "┌获取文章链接") + Debug.log(sourceUrl, "└${item.link}") + } } return articleList } diff --git a/app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt b/app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt index f4661ae45..dabfb8bb4 100644 --- a/app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt +++ b/app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt @@ -24,7 +24,7 @@ object RssParserByRule { var ruleArticles = rssSource.ruleArticles if (ruleArticles.isNullOrBlank()) { Debug.log(sourceUrl, "列表规则为空, 使用默认规则解析") - return RssParser.parseXML(body, rssSource.sourceUrl) + return RssParser.parseXML(body, sourceUrl) } else { val articleList = mutableListOf() val analyzeRule = AnalyzeRule() @@ -85,7 +85,9 @@ object RssParserByRule { Debug.log(sourceUrl, "┌获取类别", log) rssArticle.categories = analyzeRule.getString(ruleCategories) Debug.log(sourceUrl, "└${rssArticle.categories}", log) + Debug.log(sourceUrl, "┌获取描述", log) rssArticle.description = analyzeRule.getString(ruleDescription) + Debug.log(sourceUrl, "└${rssArticle.description}", log) Debug.log(sourceUrl, "┌获取图片url", log) rssArticle.image = analyzeRule.getString(ruleImage, true) Debug.log(sourceUrl, "└${rssArticle.image}", log)