Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify movie trailers using Youtube API

Tags:

youtube

movies

I'm trying to get just official movie trailers from the Youtube API, but it's difficult to get consistent results.

The closest I seem to get is using the following url:

http://gdata.youtube.com/feeds/api/videos/-/MOVIE-TITLE?max-results=1

It sometimes works well:

http://gdata.youtube.com/feeds/api/videos/-/The-A-Team?max-results=1

Other times, not as well, for example:

gdata.youtube.com/feeds/api/videos/-/The-Twilight-Saga:-Eclipse-[DVD]-The-Twilight-Saga:-Eclipse?max-results=1

I'm wondering if anyone knows of a good way to specify official movie trailers? I'd rather have no match than an irrelevant one ;)

like image 286
Don H Avatar asked Sep 17 '10 04:09

Don H


1 Answers

If you append "-trailer" to the MOVIE-TITLE you should get better results.

like image 86
dsims Avatar answered Sep 22 '22 14:09

dsims