4

I need to retrieve only english videos from the YouTube but I've found the api is pretty inaccurate.

code.google.com/apis/youtube/2.0/developers_guide_protocol.html#lrsp (sorry, max 2 links for me)

In a video search request, the lr parameter restricts the search to videos that have a
title, description or keywords in a specific language. This parameter can be used when requesting any video feeds other than standard feeds.

In a request to retrieve a list of the caption tracks available for a video, the lr parameter filters the list of caption tracks to only include the specified language.

Valid values for the lr parameter are ISO 639-1 two-letter language codes. You can also use the values zh-Hans for simplified Chinese and zh-Hant for traditional Chinese.

So I'm trying the following URL ("fotel" is a polish word): http://gdata.youtube.com/feeds/api/videos?q=fotel&orderby=published&start-index=11&max-results=10&v=2&lr=en and get lots of non-english results

but with the "ca" (catalonian): http://gdata.youtube.com/feeds/api/videos?q=fotel&orderby=published&start-index=11&max-results=10&v=2&lr=ca none result is returned.

Any ideas how can I get only english results? I can of course check the language on my own after retrieving the feed, but youtube api limits the NB of retrieved results to 1000 and I don't want to lose any.

Community
  • 1
  • 1
Adam
  • 41
  • 3

0 Answers0