get feed URL and use that to resolve URL if link is empty#77
get feed URL and use that to resolve URL if link is empty#77wyy931 wants to merge 2 commits intoRanchero-Software:mainfrom
Conversation
Sources/ObjC/RSRSSParser.m
Outdated
| NSURL *baseURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@://%@", feedURL.scheme, feedURL.host]]; | ||
| if (!baseURL) { | ||
| return s; | ||
| } | ||
| NSURL *resolvedURL = [NSURL URLWithString:s relativeToURL:baseURL]; |
There was a problem hiding this comment.
Do we need the baseURL step? My thinking is that we get the resolvedURL using the feedURL, something like:
NSURL *resolvedURL = [NSURL URLWithString:s relativeToURL:feedURL];
There was a problem hiding this comment.
I apologize, but I'm not well-acquainted with the NSURL API
|
In the situation I encountered, the RSS subscription address is https://www.fuli51.net/feed, rather than https://www.fuli51.net/. The parsed articleUrl is a number, which when concatenated forms the resolvedURL, such as https://www.fuli51.net/123456. If the baseURL is not used, it would become https://www.fuli51.net/feed/123456, resulting in the article being inaccessible. I am unsure if this is an exceptional case that I have come across. |
No description provided.