PDA

View Full Version : YouTube-API Feed RSS not loading




Lagax
Sep 17, 2012, 09:30 AM
I used this tutorial:
http://gigaom.com/apple/tutorial-build-a-simple-rss-reader-for-iphone/
And the RSS-Reader works with all RSS feeds, but the YouTube-API feeds do not, like:
"https://gdata.youtube.com/feeds/api/videos?q=football&orderby=published&max-results=10"

Also, it does not work with ANY YouTube API link like "http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured"
So why is it ONLY not working with the YouTube-API feeds?

Thanks :)



dejo
Sep 17, 2012, 09:49 AM
What do you mean by "not working"? Are you getting errors? What are you expecting to happen? What happens instead? You're going to need to give us much more detail if you expect us to help you.

KarlJay
Sep 17, 2012, 10:55 AM
I saw that the tutorial was from 2008, I'd be concerned that things might have changed since then. Maybe find a different tutorial and see if they use the same connection / format ...

Lagax
Sep 17, 2012, 11:41 AM
So, normally, with every other RSS feed it shows this feed in the UITableView, but this does not work with the YouTube API Feed.
The App sais, that it can load the Feed, but the Feed has 0 Strings, so it displays nothing but in every RSS-Reader this feed works.

So I don't understand why this does not work.

KarlJay
Sep 17, 2012, 04:28 PM
So, normally, with every other RSS feed it shows this feed in the UITableView, but this does not work with the YouTube API Feed.
The App sais, that it can load the Feed, but the Feed has 0 Strings, so it displays nothing but in every RSS-Reader this feed works.

So I don't understand why this does not work.

Is there a way you can confirm the string is there? In other words, use another program that will read the RSS feed and parse it. That'll tell you if it's a dead RSS feed or not.

If the feed is a valid feed, I'd look at the structure and see if something has changed.

If the feed is NOT valid, the site address might have changed.

Lagax
Sep 18, 2012, 06:40 AM
Yeah, I Tested it with other RSS-Readers and it worked without Problems and just showed my, what I wanted to have, for example the Recently Featured Videos.
So it just does not work with mine.

KarlJay
Sep 18, 2012, 01:10 PM
Ok, your going to have to post some code. You say the string is empty, so I assume it isn't reading in the feed. Can you check the feed and see if there's something there?

Can you post the code that actually reads in the code?

Is the same code working on different sites?

Do you have source code for the other programs that are reading in the RSS feed from YouTube?

Lagax
Sep 18, 2012, 01:27 PM
Ok, your going to have to post some code. You say the string is empty, so I assume it isn't reading in the feed. Can you check the feed and see if there's something there?

Can you post the code that actually reads in the code?

Is the same code working on different sites?

Do you have source code for the other programs that are reading in the RSS feed from YouTube?

I already answered that question in 2 other posts.
The feed is working in EVERY other RSS reader AND EVERY OTHER feed works with my code!

Actually that was my reason to create this threat.

Thanks

ArtOfWarfare
Sep 18, 2012, 10:09 PM
I used this tutorial:
http://gigaom.com/apple/tutorial-build-a-simple-rss-reader-for-iphone/
And the RSS-Reader works with all RSS feeds, but the YouTube-API feeds do not, like:
"https://gdata.youtube.com/feeds/api/videos?q=football&orderby=published&max-results=10"

Also, it does not work with ANY YouTube API link like "http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured"
So why is it ONLY not working with the YouTube-API feeds?

Thanks :)

I'm going to flip your question around on you:

Why does it work with EVERY OTHER feed?

I haven't looked at their tutorial. I wrote my own RSS parser from nothing (it was fairly trivial.) The very first thing I did was have it just download and output the entire RSS document into my log so I had an idea of what it looks like. After that, I looked up the RSS specifications online and realized it's just XML. So I made my program run the downloaded document through an XMLParser and output the tags and characters as it found them.

I would suggest breaking down the tutorial into pieces and figuring out how each part works. Try to find a way to get the raw documents onto your log so you can look at one that works side by side with one that doesn't work to see what's different between them and where the code is tripping up.

KarlJay
Sep 19, 2012, 05:59 AM
I already answered that question in 2 other posts.
The feed is working in EVERY other RSS reader AND EVERY OTHER feed works with my code!

Actually that was my reason to create this threat.

Thanks

That would suggest that the RSS feed might have changed. I'd look at how the string is obtained and how it is processed. From your prior post, I take it you are not able to get the RSS feed into a string.

If the same code works with other feeds, and not this feed, I'd look at the feed and see if you are trying to get a feed that has been moved. In other words, the tutorial is from 2008, did youtube change where the feed is since then?

Should be easy to find another tutorial and see where they are getting their feed. I'd guess that they've change where the feed is. I'm no expert on feeds, but can't a web browser grab a feed?