Adjust scoring in FeedSpecifier to slightly prefer JSON feeds.

This commit is contained in:
Brent Simmons 2017-11-25 16:47:36 -08:00
parent 489cf8e29b
commit 23af6b4d29

View File

@ -102,11 +102,17 @@ private extension FeedSpecifier {
if urlString.hasSuffix("/feed") {
score = score + 4
}
if urlString.rs_caseInsensitiveContains("json") {
score = score + 6
}
if let title = title {
if title.rs_caseInsensitiveContains("comments") {
score = score - 10
}
if title.rs_caseInsensitiveContains("json") {
score = score + 1
}
}
return score