|
|
@ -39,14 +39,13 @@ object RssParserByRule { |
|
|
|
Debug.log(sourceUrl, "└列表大小:${collections.size}") |
|
|
|
Debug.log(sourceUrl, "└列表大小:${collections.size}") |
|
|
|
val ruleTitle = analyzeRule.splitSourceRule(rssSource.ruleTitle) |
|
|
|
val ruleTitle = analyzeRule.splitSourceRule(rssSource.ruleTitle) |
|
|
|
val rulePubDate = analyzeRule.splitSourceRule(rssSource.rulePubDate) |
|
|
|
val rulePubDate = analyzeRule.splitSourceRule(rssSource.rulePubDate) |
|
|
|
val ruleCategories = analyzeRule.splitSourceRule(rssSource.ruleCategories) |
|
|
|
|
|
|
|
val ruleDescription = analyzeRule.splitSourceRule(rssSource.ruleDescription) |
|
|
|
val ruleDescription = analyzeRule.splitSourceRule(rssSource.ruleDescription) |
|
|
|
val ruleImage = analyzeRule.splitSourceRule(rssSource.ruleImage) |
|
|
|
val ruleImage = analyzeRule.splitSourceRule(rssSource.ruleImage) |
|
|
|
val ruleLink = analyzeRule.splitSourceRule(rssSource.ruleLink) |
|
|
|
val ruleLink = analyzeRule.splitSourceRule(rssSource.ruleLink) |
|
|
|
for ((index, item) in collections.withIndex()) { |
|
|
|
for ((index, item) in collections.withIndex()) { |
|
|
|
getItem( |
|
|
|
getItem( |
|
|
|
sourceUrl, item, analyzeRule, index == 0, ruleTitle, |
|
|
|
sourceUrl, item, analyzeRule, index == 0, |
|
|
|
rulePubDate, ruleCategories, ruleDescription, ruleImage, ruleLink |
|
|
|
ruleTitle, rulePubDate, ruleDescription, ruleImage, ruleLink |
|
|
|
)?.let { |
|
|
|
)?.let { |
|
|
|
it.origin = rssSource.sourceUrl |
|
|
|
it.origin = rssSource.sourceUrl |
|
|
|
articleList.add(it) |
|
|
|
articleList.add(it) |
|
|
@ -69,7 +68,6 @@ object RssParserByRule { |
|
|
|
log: Boolean, |
|
|
|
log: Boolean, |
|
|
|
ruleTitle: List<AnalyzeRule.SourceRule>, |
|
|
|
ruleTitle: List<AnalyzeRule.SourceRule>, |
|
|
|
rulePubDate: List<AnalyzeRule.SourceRule>, |
|
|
|
rulePubDate: List<AnalyzeRule.SourceRule>, |
|
|
|
ruleCategories: List<AnalyzeRule.SourceRule>, |
|
|
|
|
|
|
|
ruleDescription: List<AnalyzeRule.SourceRule>, |
|
|
|
ruleDescription: List<AnalyzeRule.SourceRule>, |
|
|
|
ruleImage: List<AnalyzeRule.SourceRule>, |
|
|
|
ruleImage: List<AnalyzeRule.SourceRule>, |
|
|
|
ruleLink: List<AnalyzeRule.SourceRule> |
|
|
|
ruleLink: List<AnalyzeRule.SourceRule> |
|
|
@ -82,9 +80,6 @@ object RssParserByRule { |
|
|
|
Debug.log(sourceUrl, "┌获取时间", log) |
|
|
|
Debug.log(sourceUrl, "┌获取时间", log) |
|
|
|
rssArticle.pubDate = analyzeRule.getString(rulePubDate) |
|
|
|
rssArticle.pubDate = analyzeRule.getString(rulePubDate) |
|
|
|
Debug.log(sourceUrl, "└${rssArticle.pubDate}", log) |
|
|
|
Debug.log(sourceUrl, "└${rssArticle.pubDate}", log) |
|
|
|
Debug.log(sourceUrl, "┌获取类别", log) |
|
|
|
|
|
|
|
rssArticle.categories = analyzeRule.getString(ruleCategories) |
|
|
|
|
|
|
|
Debug.log(sourceUrl, "└${rssArticle.categories}", log) |
|
|
|
|
|
|
|
Debug.log(sourceUrl, "┌获取描述", log) |
|
|
|
Debug.log(sourceUrl, "┌获取描述", log) |
|
|
|
rssArticle.description = analyzeRule.getString(ruleDescription) |
|
|
|
rssArticle.description = analyzeRule.getString(ruleDescription) |
|
|
|
Debug.log(sourceUrl, "└${rssArticle.description}", log) |
|
|
|
Debug.log(sourceUrl, "└${rssArticle.description}", log) |
|
|
|