FeedKit icon indicating copy to clipboard operation
FeedKit copied to clipboard

Not able to parse some websites

Open legolasW opened this issue 4 years ago • 1 comments

I tested the RSS feed below using the sample app, but unfortunately it gives no result.

http://feeds.bbci.co.uk/news/rss.xml

I'm a bit confused, as it seems to be parse some website and can't parse the result. Which type of Rss can FeedKit parse in particular?

legolasW avatar Feb 11 '21 08:02 legolasW

import Foundation
import FeedKit

let source = URL(string: "http://feeds.bbci.co.uk/news/rss.xml")!


let parser = FeedParser(URL: source)
let result = parser.parse()
var parsedFeed = RSSFeed()

switch result {
case .success(let feed):
    parsedFeed = feed.rssFeed!
case .failure(let error):
    print(error)
}

for feedItem in parsedFeed.items! {
    print(feedItem.link!)
}

A playground like this is working on my side, what kind of error do you see?

a40yostudent avatar Apr 16 '21 13:04 a40yostudent

Thank you for the issue @legolasW and thank you for helping @40yostudent

nmdias avatar Dec 08 '22 01:12 nmdias