IMDB - add Rottentomatoes info

Adds info from Rottentomatoes to IMDB title pages

< Feedback on IMDB - add Rottentomatoes info

Review: ناچار - قوليازما ئىشلىمەيدۇ

§
يوللانغان ۋاقتى: 2017-03-12

Not working anymore

Gives No Score Yet and No Audience messages for each IMDb movie page.

§
يوللانغان ۋاقتى: 2017-03-12

Same here.
Hope someone will see to it and repair.

Curtis Gibbyئاپتور
§
يوللانغان ۋاقتى: 2017-03-15

This is a problem with the OMDb API that actually provides the Rotten Tomatoes information. For whatever reason, it now just returns "n/a" for all of the RT fields. See http://www.omdbapi.com/?tomatoes=true&i=tt0121765 . Until OMDb fixes their side, there's nothing that I can do to get it back up and running.

§
يوللانغان ۋاقتى: 2017-03-30
تەھرىرلەنگەن ۋاقتى: 2017-03-30

Rottentomatoes' rating issue/bug has been fixed by your collegue chocolateboy a few hours ago, so please fix your script also, thank you in advance.

Fix: https://github.com/chocolateboy/userscripts/commit/5d5e736fbd9c90ccd468ec1b2fc44cf22365833c

Script: https://greasyfork.org/de/scripts/15222-imdb-tomatoes

Curtis Gibbyئاپتور
§
يوللانغان ۋاقتى: 2018-01-26

I've updated this script to a new version 4.1 that now works again!

§
يوللانغان ۋاقتى: 2018-01-26
تەھرىرلەنگەن ۋاقتى: 2018-01-26

OMG that's great news!!! However I installed it and I'm getting "Error getting results from Cinesift". My friend got the same error on Chrome too.

EDIT: I use Violentmonkey on FF and Tampermonkey on Chrome.

§
يوللانغان ۋاقتى: 2018-01-26
تەھرىرلەنگەن ۋاقتى: 2018-01-29

Thanks for the good news!

It works fine in Greasemonkey (using 4.2beta3 in Firefox).

Unfortunately it doesn't work (I get 'Error getting results from Cinesift.') with Tampermonkey (using 4.5) in neither Firefox nor Chrome,

Curtis Gibbyئاپتور
§
يوللانغان ۋاقتى: 2018-01-27

I don't know the intricacies of Greasemonkey vs. Violentmonkey vs. Tampermonkey. I'm hooking into jQuery's $.ajax function to pull in the data. I really only develop for Greasemonkey. If you can figure out a possible change to get it working in the other add-ons, I'll add it to the script.

§
يوللانغان ۋاقتى: 2018-01-29
تەھرىرلەنگەن ۋاقتى: 2018-01-29

The problem is that ajax requests are subject to the same origin policy (CSP). In Greasemonkey 4.x that is not happening yet, like it was in 3.x. In Tampermonkey it is.

So, you may add

// @require     https://github.com/greasemonkey/gm4-polyfill/raw/master/gm4-polyfill.js
// @grant       GM_xmlhttpRequest
// @grant       GM.xmlHttpRequest

and replace lines 291-298 :

$.ajax({
    url: apiUrl
}).done(function(data) {
    data = JSON.parse(data);
    parseValidResponse(data);
}).error(function(err) {
    $('#rottenTomatoesResults').html('Error getting results from Cinesift.');
});

with

GM.xmlHttpRequest({
    method: 'GET',
    url: apiUrl,
    onload: function(response) {
        parseValidResponse(JSON.parse(JSON.parse(response.responseText)))
    },
    onerror: function(err) {
        $('#rottenTomatoesResults').html('Error getting results from Cinesift');
    },
});

(yes, JSON.parse is applied twice).

Then, the first time you'll load any imdb page you'll get a prompt from TM
to confirm allowing cinesift.com in the script's settings | XHR security | User domain whitelist'

§
يوللانغان ۋاقتى: 2018-01-29

@darkred thanks man

§
يوللانغان ۋاقتى: 2018-01-29
تەھرىرلەنگەن ۋاقتى: 2018-02-06

I've added in the code the following

// @require     https://github.com/greasemonkey/gm4-polyfill/raw/master/gm4-polyfill.js
// @grant       GM.xmlHttpRequest

in order to make it compatible with both TM and GM 4.x

§
يوللانغان ۋاقتى: 2018-02-16

Stopped working.

It always shows
"Checking Rotten Tomatoes..."

§
يوللانغان ۋاقتى: 2018-02-26

Yep, doesn't work - always results in: "Error getting results from Cinesift."

§
يوللانغان ۋاقتى: 2018-02-26
تەھرىرلەنگەن ۋاقتى: 2018-02-26
Yep, doesn't work - always results in: "Error getting results from Cinesift."

What extension do you use? Did you try darkred's solution?

Curtis Gibbyئاپتور
§
يوللانغان ۋاقتى: 2018-03-15

The "Error getting results from Cinesift" error was because they changed something in their URL. I've updated the script to compensate, so it should be working again.

§
يوللانغان ۋاقتى: 2018-03-15

Works again thanks!

§
يوللانغان ۋاقتى: 2018-03-15
تەھرىرلەنگەن ۋاقتى: 2018-03-15

Unfortunately I still get "Error getting results from Cinesift" with your new version. Using Tampermonkey in both Chrome and Firefox.

§
يوللانغان ۋاقتى: 2018-03-15

Unfortunately I still get "Error getting results from Cinesift" with your new version.

Using Tampermonkey in both Chrome and Firefox.

I use Violentmonkey on FF and I modified the new version of the script as you suggested a few comments above and it works.

§
يوللانغان ۋاقتى: 2018-03-15
تەھرىرلەنگەن ۋاقتى: 2018-03-15

Yes, in Tampermonkey with my modifications it works ok.

In Greasemonkey 4.2 stable on FF59 it installs and works ok.

In Greasemonkey 4.3beta7 on FF59 (even in a fresh FF profile) the script doesn't get installed due to this GM bug. It's fixed in the upcoming GM 4.3beta8/4.3.

§
يوللانغان ۋاقتى: 2018-03-31
تەھرىرلەنگەن ۋاقتى: 2018-03-31

Well, I'm still getting "Error getting results from Cinesift." with Greasemonkey 4.2 stable on FF59 :( 4.3 it behaves the same way also

§
يوللانغان ۋاقتى: 2018-03-31

Yeah stopped working again :(

§
يوللانغان ۋاقتى: 2018-04-11
تەھرىرلەنگەن ۋاقتى: 2018-04-11

Doesn't work anymore: "Error getting results from Cinesift." :(

Chrome with Tampermonkey

§
يوللانغان ۋاقتى: 2018-05-18
تەھرىرلەنگەن ۋاقتى: 2018-05-18

Looks like cinesift are now redirecting to flickmetrix, which don't expose the same API.

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.