4
votes

I'm playing with YouTube API. Using the following URL: https://gdata.youtube.com/feeds/api/users/RayWilliamJohnson/uploads, how do I get the video URLs? The URLs all seem to have the schema https://. Shouldn't there be an http:// only?

1
I didnt knew that youtube has any API. Thanks for this question!Kamil
Almost everything has an API nowadays.StackOverflowNewbie
Please show your code for retrieving the feed. Tip: you can use json by adding ?alt=json to the url, it it's better in your case than XML. Still, I'd prefer Zend Gdata, which has functions for things like this.Martti Laine
I don't need to show that code. There are several ways to do it. You can even just do it from the browser. All I want to know is how to get the URL for the video (the http version). Also, why do you think JSON is better than XML?StackOverflowNewbie
@StackOverflowNewbie I assumed you have some code ready already and would like to simply add this functionality to it. As you said, there are many ways to retrieve the feed, so what method should the answerer use? You don't even tell the language you work in.Martti Laine

1 Answers

2
votes

Find <entry> tag, which gives each video's information. <id> tag inside <entry> should be what you need.

For example, <entry><id>http://gdata.youtube.com/feeds/api/videos/u5yEXai8MoQ</id>