Finding a feed link in a web page


show more Finding a feed link in a web page provides you with in-depth training on Developer. Taught by Bill Weinman as part of the iOS SDK and SQLite: Building Data-Driven Apps (2013) show less
please wait ...

Finding a feed link in a web page

Now that we have the Add View constructed, our first task is to get the URL for the RSS feed. Many website support the RSS autodiscovery specification using a link tag to point to the URL for an RSS feed. Our Add View controller will have support for either the URL of an RSS feed or the URL of a web page that supports RSS feed autodiscovery. When the user enters the URL, it could be either a web page or a feed. So the first thing we need to do is use NSURL Connection to fetch the URL.

Then we inspect the MIME type to find out if it's a web page or an RSS feed. If we have a web page, we need to look in the header section of the web page to see if there's a link tag pointing to an RSS feed, and then go fetch that URL and treat it as the feed. For example, Ars Technica here, if I press Option+Command+U--this is Chrome so that will show the source for the web page-- you notice down here we have this link tag right there: relationship, alternate, type, application rss+xml, and then t...

Finding a feed link in a web page
Video duration: 8m 55s 3h 45m Intermediate

Viewers:

Finding a feed link in a web page provides you with in-depth training on Developer. Taught by Bill Weinman as part of the iOS SDK and SQLite: Building Data-Driven Apps (2013)

Subject:
Developer
Software:
iOS
Author:
please wait ...