123
123

Reputation: 71

Get image URL from rss

I'd like to get the first image URL of an post from this rss file: http://www.macnotes.de/feed/

How can I do this in Swift?

I got the description, the title an the author like this:

    let item = feedItems[indexPath.row] as MWFeedItem
    let vc = ViewController()
    vc.text.text = item.description
    vc.author.text = item.author
    vc.layer.text = item.title

Upvotes: 0

Views: 589

Answers (1)

Joe Benton
Joe Benton

Reputation: 3753

As I said in the comments, there's not an easy way to grab the image as its hidden amongst the content html.

To achieve this you can use regex to look through the content for img tags:

How to get all <img src> of a web page in iOS UIWebView?

Hope this is useful.

Upvotes: 1

Related Questions