问题
I was searching but couldn't find anywhere how to retrieve random video which is most viewed or trending this day or this week. How could I do that?
回答1:
No document hint a radom way. In fact, youtube use google search engine, as I know, there is no opinion set in all the google search api.
So if you want do a random show. You can catch all the standard result to database, then make them random show.
most recent
most viewed
top rated
most discussed
top favorites
recently featured
most responded
most linked
回答2:
The YouTube Data API will allow you to do that.
You can find out more about it here: http://gdata.youtube.com/demo/index.html
回答3:
Dude you just need to consult the You Tube API
For Example you can use following urls to send requests to get most recent
http://gdata.youtube.com/feeds/api/standardfeeds/most_recent
most viewed
http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed
Top rated
http://gdata.youtube.com/feeds/api/standardfeeds/top_rated
etc. Consult the API, you will get the more information from there
回答4:
I think this is possible, You can use YouTube authenticated Zend API
Read API methods from below link http://framework.zend.com/manual/en/zend.gdata.youtube.html
All the available methods are defined, so you be reading methods name you can guess what they are doing.
回答5:
these are the methods in the youtube php api that gives you the opportunity to get a list of videos based on different criteria, then its easy to pick for example a random video from the top rated feeds.
http://code.google.com/apis/youtube/2.0/developers_guide_php.html#Retrieving_and_searching_for_videos
来源:https://stackoverflow.com/questions/7943406/how-to-get-the-most-trends-interesting-most-viewed-videos-from-youtube