Site icon Random Thoughts

Youtube and “unsupported device” redux

I posted yesterday about my extremely useful Youtube-based weather monitor not working properly any more.  I thought Google had changed the video format or something — refusing to play videos when using mplayer.

After adding more debugging to the script that runs the monitor, that turned out to be incorrect.

Here’s the search result for a song by Dollboy:

Searching for Dollboy+The%20Ventriloquist (200)
Duration: 236 (https://youtube.com/devicesupport)
Duration: 232 (Puppet Dancing in South Africa)
Duration: 324 (Ventriloquist Dummy Creepy Doll Makeup Tutorial)
Duration: 449 (Creepy Broken Doll: Hair, Makeup, and Costume Tutorial!)

One of the results in the search is the “unsupported device” video!  And my script would pick that video if it’s the one that has the most appropriate duration.  And it seems to be in the result set for any searches:

[larsi@potato ~]$ ./src/flutter/flutter "" "foo"
Searching for foo (200)
Duration: 245 (Foo Fighters - In The Clear)
Duration: 236 (https://youtube.com/devicesupport)
Duration: 271 (Foo Fighters - The Pretender)

So this is just Google’s way of saying that their old search API is being phased out?  I’m using the

https://gdata.youtube.com/feeds/api/videos?q=$search&max-results=10&v=2

API.  And this seems to be the case: The API v2 is being discontinued.  The v3 API requires an application ID, and it’s more JSON-ey, but it looks like it should provide the same functionality as the v2 API.

It’s nice of Google to notify the users of the v2 API that this is happening, I guess, but it would have been nice if the video said something about the API instead of just saying that the device was unsupported.

Exit mobile version