Adding IMDb ratings to BBC iPlayer films - a greasemonkey script

Posted by Howard Richardson (comments: 2)

How better to waste an hour on a Sunday afternoon than cooking up a Greasemonkey script that automatically adds in the IMDb ratings for all the films currently on the BBC iPlayer films page:

// ==UserScript==
// @name           IMDB Ratings in BBC iPlayer
// @namespace
// @grant          GM_xmlhttpRequest
// @description    Adds ratings from IMDB to films in iPlayer
// @include
// @require
// ==/UserScript==

// New version, changed to use omdbapi instead 

		var cache_this = this;
		currentTitleChunk = $(this).find('span.title');
		currentTitle = currentTitleChunk.text();
		    method: "GET",
		  url: "" + currentTitle,
		    onload: function(response) {
		      var foo_result=jQuery.parseJSON(response.responseText);
		      var rating=foo_result.imdbRating;
		      $(cache_this).find('span.title').append(' ('+rating+' on IMDb)');

} );

Go back

Add a comment

Comment by Graham |

Thanks for this. Really useful. It'll really help choosing which film (if any) to watch!

Comment by M |

Any way to only display one's own ratings instead of the average?