cptbrainia 3 Posted April 30, 2022 Posted April 30, 2022 I've been reading around and realize (I think) that we can't change the RottenTomatoes critic rating to the audience score due to cost/info passed along from RT. However, is there a way to get a link added to the bottom of the media? Underneath links (in a movie library), there are links to the IMDB page, TheMovieDB page, and Trakt (if it's installed). Is there any way to add an RT link here? Thanks!
Happy2Play 9780 Posted April 30, 2022 Posted April 30, 2022 Not unless there is an easy search url to use existing TMDB or IMDB id to get to an item on RT. Like Trakt links are by tmdbid or imdbid https://trakt.tv/search/tmdb/767825?id_type=movie https://trakt.tv/search/imdb/tt12585076?id_type=movie
visproduction 315 Posted May 1, 2022 Posted May 1, 2022 It wouldn't be an easy hack. Rottentomates links work like this: https://www.rottentomatoes.com/m/vortex_2021 - goes to the movie name 'Vortex' released in 2021 https://www.rottentomatoes.com/m/vortex - goes to 'Vortex' release in 2001 - I assume this is the first instance of a movie with this name. https://www.rottentomatoes.com/m/vortex_2001 - goes to 404 missing page. The only recognizable code in the HTML doc appears to be the H1 title: <h1>404 - Not Found</h1> Maybe do a delayed .js script to make a link to https://www.rottentomatoes.com/m/{movie name}_{release year}. Search the DOM for <h1> 404 - Not Found</h1>. If found then try just https://www.rottentomatoes.com/m/{movie name} If you still get a 404, then change the link CSS class to hidden. There is probably also some version name change for movies and TV shows that have the same name in the same year. That would probably break this hack. Maybe you could search by director to confirm you found the right media page.
cptbrainia 3 Posted May 7, 2022 Author Posted May 7, 2022 Thanks for the responses; I appreciate anyone other than me giving it some thought. Let me preface what I'm about to say with this: I expect that I'm wrong and that I just don't understand yet why I'm wrong. That being said... Doing some poking around, couldn't this just be parsed from the rottentomatoes API? You can view the results for your example below: https://www.rottentomatoes.com/api/private/v2.0/search?q=vortex It lists all 15 movies and separates them by year released. Couldn't emby just pull the URL for the release that matches the year of the media you're viewing? I'm sure there are some examples where this could get dicey, e.g. maybe a common name where there are two movies with the same name released the same year, but it seems like if you could manually set the link in the metadata or something, that would be workable. Honestly, I'd take any implementation - even a rough one. I hate the process/steps required to pull an Emby movie up on RottenTomatoes. Also, as my friend pointed out, Plex provides user ratings. I don't care about Plex having a feature that Emby doesn't, but I don't like my friend having bragging rights.
visproduction 315 Posted May 7, 2022 Posted May 7, 2022 (edited) Cpt, Nice find, but only some of the links go to a media page. A lot of the links go to 404 - Not found. RT probably limits their dbase entries to those with some hits. Or, there is a different API page that is more up to date. I already tried v.2.1 and v2.01... nothing. It's a good chance that coding a scraping script might work most of the time with this API link, but it would be nice to find out if there is a more up to date API. How did you find this one? Maybe there is discussion further. It's sort of annoying when you write a script and 2 weeks later the site updates and your script fails. Obviously, the best answer is to contact the site and work out a deal. If links appear inside Emby product, then Rotten Tomatoes gets a promotion and traffic, as well. Sometimes, the company is happy to provide up to date API that will continue to work. Edited May 7, 2022 by visproduction
ebr 16169 Posted May 8, 2022 Posted May 8, 2022 I'm not sure where that API url came from but the RT API and data are not free and any attempt to "scrape" this data from web pages or discovered urls would be violating their IP.
BillOatman 596 Posted May 8, 2022 Posted May 8, 2022 (edited) @ebr Looks like you fill out a proposal form and if they like you, you can use their data. I have to believe Emby would get approved. The link is here. Edited May 8, 2022 by BillOatman
roaku 842 Posted May 8, 2022 Posted May 8, 2022 1 hour ago, BillOatman said: @ebr Looks like you fill out' a proposal form and if they like you, you can use their data. I have to believe Emby would get approved. The link is here. Being 'liked' by them is comically expensive.
Happy2Play 9780 Posted May 8, 2022 Posted May 8, 2022 From an old post. Quote "Thank you for your interest in the Rotten Tomatoes API. API users have access to our existing API, which provides full access to Rotten Tomatoes Scores and Reviews Snippets (up to 20), for an annual fee which starts at $60,000." Rotten Tomatoes API? : webdev (reddit.com)
cptbrainia 3 Posted May 9, 2022 Author Posted May 9, 2022 Do you have any newer source as to the cost/process? That reddit link is from 6 years ago. It's quite possible something has changed in that time.
Happy2Play 9780 Posted May 9, 2022 Posted May 9, 2022 7 minutes ago, cptbrainia said: Do you have any newer source as to the cost/process? That reddit link is from 6 years ago. It's quite possible something has changed in that time. Not that I have found. But would not be surprised if it hasn't changed or went up. As IMDB is the exact same way wanting $50,000 a year for their Community Ratings. AWS Marketplace: IMDb Ratings for Movies/TV/OTT (Bulk data) (amazon.com)
BillOatman 596 Posted May 10, 2022 Posted May 10, 2022 The RT proposal form doesn't show cost, but this line would imply it is not free. Quote Unfortunately we cannot support data feed requests for educational or personal purposes at this time.
cptbrainia 3 Posted May 11, 2022 Author Posted May 11, 2022 They had an email contact form on their website for their business development team. I went ahead and just asked them directly. Worse comes to worse, they simply ignore me (insert joke here about my wife). I'll post if I get any response.
cptbrainia 3 Posted May 16, 2022 Author Posted May 16, 2022 Quote Thank you for your email and interest in Rotten Tomatoes. Please submit your inquiry via the following link. https://www.rottentomatoes.com/help\_desk/proposalform Best Regards, Ursula Rotten Tomatoes Customer Support I guess we'll never know.
sh0rty 714 Posted Sunday at 04:15 PM Posted Sunday at 04:15 PM (edited) Now that I'm working on some stuff related to this, I can say that adding a RT link is technically fairly easy doable in Emby without violating anything regarding APIs or website scraping just by querying wikidata sparql API. With the IMDB-ID extracted from Emby DB (wikidata property P345) you can query property P1258 -> Rotten tomatoes slug. Example Fantastic Four - First steps -> API request SELECT ?rtId WHERE { ?item wdt:P345 "tt10676052" . ?item wdt:P1258 ?rtId . } LIMIT 1 Result: m/the_fantastic_four_first_steps Emby would need just append it to the base URL: https://www.rottentomatoes.com/m/the_fantastic_four_first_steps This works 98% of the time for mainstream titles. If you have niche titles, it may be possible that the RT slug is not yet provided by wikidata. But everyone is free to add it by himself. Generating the link for an item just would need to be throttled or be done on demand and then written to Emby DB when accessing a specific item to not violate wikidata terms for the API. Generate the RT slugs on library scan for hundreds or thousands of items at once would not be a good idea for example Quote SPARQL Query Service (query.wikidata.org): Runtime: Max 60 seconds per query. Concurrency: Max 5 concurrent queries per IP address. Results: Large queries may be throttled or capped in result size. Perhaps @ebrcan elaborate on this regarding Law and Order. Edited Sunday at 04:28 PM by sh0rty
ebr 16169 Posted Sunday at 10:11 PM Posted Sunday at 10:11 PM 5 hours ago, sh0rty said: Perhaps @ebrcan elaborate on this regarding Law and Order. I looked but was unable to find the terms of use for this API. Can you point me to it? Thanks.
sh0rty 714 Posted Sunday at 11:50 PM Posted Sunday at 11:50 PM (edited) 1 hour ago, ebr said: I looked but was unable to find the terms of use for this API. Can you point me to it? Thanks. This is the full limit explanation: Quote Query limits There is a hard query deadline configured which is set to 60 seconds. There are also following limits: One client (user agent + IP) is allowed 60 seconds of processing time each 60 seconds One client is allowed 30 error queries per minute Clients exceeding the limits above are throttled with HTTP code 429. Use Retry-After header to see when the request can be repeated. If the client ignores 429 responses and continues to produce requests over the limits, it can be temporarily banned from the service. Clients who don’t comply with the User-Agent policy may be blocked completely – make sure to send a good User-Agent header. Every query will timeout when it takes more time to execute than this configured deadline. You may want to optimize the query or report a problematic query here. Also note that currently access to the service is limited to 5 parallel queries per IP. The above limits are subject to change depending on resources and usage patterns. Query limits: https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual#:~:text=rdf-results-table-,Query limits,30 error queries per minute https://www.wikidata.org/wiki/Wikidata%3ASPARQL_query_service Tthe API is relying on the same ToS/ToU like all wikimedia services like wikipedia. Terms of Use: https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use As far as I can see, there should be no problem to use the wikidata RT slug in Emby, since the data is licenced under CC0 1.0 (except any RT logo -> RT ToS but Emby doesn't use IMDB etc. logos anyway). Edited Monday at 12:04 AM by sh0rty
ebr 16169 Posted Monday at 01:56 PM Posted Monday at 01:56 PM Thanks. The way I read all that, obtaining and displaying the links to RT should not be a problem. We could not display any content at the end of those links however.
sh0rty 714 Posted Monday at 04:53 PM Posted Monday at 04:53 PM 2 hours ago, ebr said: We could not display any content at the end of those links however. This is clear. But perhaps the wikidata API is considered by the team to show a RT link beside IMDb etc. in the future. Just another small but nice addition. BTW is copyright the reason to not show Logos of the Providers like IMDb, Trakt, TMDb, TVDb on item detail pages?
ebr 16169 Posted Monday at 08:20 PM Posted Monday at 08:20 PM 3 hours ago, sh0rty said: BTW is copyright the reason to not show Logos of the Providers like IMDb, Trakt, TMDb, TVDb on item detail pages? It was really more of a design decision but not having them does help keep us from getting randomly DMCA'd 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now