mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
@@ -29,14 +29,14 @@ class HTMLFeedFinder {
|
||||
}
|
||||
}
|
||||
|
||||
if let bodyLinks = RSHTMLLinkParser.htmlLinks(with: parserData) {
|
||||
for oneBodyLink in bodyLinks {
|
||||
let bodyLinks = RSHTMLLinkParser.htmlLinks(with: parserData)
|
||||
|
||||
if linkMightBeFeed(oneBodyLink) {
|
||||
let normalizedURL = oneBodyLink.urlString.normalizedURL
|
||||
let oneFeedSpecifier = FeedSpecifier(title: oneBodyLink.text, urlString: normalizedURL, source: .HTMLLink)
|
||||
addFeedSpecifier(oneFeedSpecifier)
|
||||
}
|
||||
for oneBodyLink in bodyLinks {
|
||||
|
||||
if linkMightBeFeed(oneBodyLink) {
|
||||
guard let normalizedURL = oneBodyLink.urlString?.normalizedURL else { continue }
|
||||
let oneFeedSpecifier = FeedSpecifier(title: oneBodyLink.text, urlString: normalizedURL, source: .HTMLLink)
|
||||
addFeedSpecifier(oneFeedSpecifier)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1061,7 +1061,7 @@ private extension FeedbinAccountDelegate {
|
||||
|
||||
let parsedItems: [ParsedItem] = entries.map { entry in
|
||||
let authors = Set([ParsedAuthor(name: entry.authorName, url: entry.jsonFeed?.jsonFeedAuthor?.url, avatarURL: entry.jsonFeed?.jsonFeedAuthor?.avatarURL, emailAddress: nil)])
|
||||
return ParsedItem(syncServiceID: String(entry.articleID), uniqueID: String(entry.articleID), feedURL: String(entry.feedID), url: entry.url, externalURL: nil, title: entry.title, contentHTML: entry.contentHTML, contentText: nil, summary: entry.summary, imageURL: nil, bannerImageURL: nil, datePublished: entry.parsedDatePublished, dateModified: nil, authors: authors, tags: nil, attachments: nil)
|
||||
return ParsedItem(syncServiceID: String(entry.articleID), uniqueID: String(entry.articleID), feedURL: String(entry.feedID), url: entry.url, externalURL: nil, title: entry.title, language: nil, contentHTML: entry.contentHTML, contentText: nil, summary: entry.summary, imageURL: nil, bannerImageURL: nil, datePublished: entry.parsedDatePublished, dateModified: nil, authors: authors, tags: nil, attachments: nil)
|
||||
}
|
||||
|
||||
return Set(parsedItems)
|
||||
|
||||
@@ -13,7 +13,9 @@ extension RSHTMLMetadata {
|
||||
|
||||
func largestOpenGraphImageURL() -> String? {
|
||||
|
||||
guard let openGraphImages = openGraphProperties?.images, !openGraphImages.isEmpty else {
|
||||
let openGraphImages = openGraphProperties.images
|
||||
|
||||
guard !openGraphImages.isEmpty else {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -44,7 +46,9 @@ extension RSHTMLMetadata {
|
||||
|
||||
func largestAppleTouchIcon() -> String? {
|
||||
|
||||
guard let icons = appleTouchIcons, !icons.isEmpty else {
|
||||
let icons = appleTouchIcons
|
||||
|
||||
guard !icons.isEmpty else {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Submodule submodules/RSParser updated: 81c400a766...fcbd9a34ec
Reference in New Issue
Block a user