Querying YouTube for particular types of videos using a keyword
I want to load my site with a large number of youtube videos and thought there must be a way I can get the data I need automatically. I know there is a YouTube API which could potentially do the job but does anyone know of any apps that may already do this for me.
Ideally I want to add a query string and have the metadata of all the videos returned so I can load them straight into my database and embed in the site开发者_如何转开发.
Thanks.
Try using the Youtube RSS Feeds.
http://www.youtube.com/rssls
As an example if you want to search for videos by keyword NFL you can use the URL:
http://gdata.youtube.com/feeds/base/videos?q=NFL&client=ytapi-youtube-search&v=2
You get the response as XML(RSS format), which you can parse and use as needed.
精彩评论