[mythtv-users] mythnetvision searching youtube

Robert McNamara robert.mcnamara at gmail.com
Mon Feb 28 21:08:10 UTC 2011


On Mon, Feb 28, 2011 at 1:04 PM, Dave Brown <davebrown099 at gmail.com> wrote:
>
> Im not sure if this is breaking any rules.  Apologies if thats the case
> however, im using mythbuntu and you can change the order of the youtube
> results to relevance by editing
>
> /usr/share/mythtv/internetcontent/nv_python_libs/youtube/youtube_api.py
>
> and line
>
> # v2 api calls - An example that must be customized for each target site
> self.config[u'urls'][u'video.search'] =
> 'http://gdata.youtube.com/feeds/api/videos?vq=%s&max-results=%s&start-index=%s&orderby=rating&Ir=%s'
>
> to
>
> # v2 api calls - An example that must be customized for each target site
> self.config[u'urls'][u'video.search'] =
> 'http://gdata.youtube.com/feeds/api/videos?vq=%s&max-results=%s&start-index=%s&orderby=relevance&Ir=%s'
>
> I find this to work much better.  My wife likes to search youtube videos for
> horses and under the default search the results are returned under the order
> "rating".  The first 4 videos are about the halo game, the next a johnny
> cash video and next half dozen are not really related to the 4 legged
> animal.
>
> Changing this to be sorted by relevance helps.

Doesn't bother me, it's open source, people are free to change the
code however they like ;)

It does illustrate the point above, basically-- we pull from the API,
and there are probably ways of being more or less close to the web
search, but ultimately in the case of all the grabbers we're at the
mercy of what the API gives us-- on the other hand, by using APIs we
have a pretty good shot of the data sources not random disappearing on
us :)

Robert


More information about the mythtv-users mailing list