IMDb Scraper with RottenTomatoes rating (check end of thread for final versions) | Page 6

Discussion in 'Moving Pictures' started by RoChess, January 3, 2010.

  1. mortstar
    • Premium Supporter

    mortstar MP Donator

    Joined:
    January 30, 2008
    Messages:
    415
    Likes Received:
    41
    Ratings:
    +41 / 0
    Home Country:
    England England
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4



    Okay I increased the version to 1.5.6 which changes the RT scraper to use uk.rottentomatoes instead of www.rottentomatoes.

    I tested it on Surferosa's 3 problem movies and it was returning the proper score. Thanks to RoChess as always.
     

    Attached Files:

  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Surferosa

    Surferosa Portal Pro

    Joined:
    September 2, 2009
    Messages:
    55
    Likes Received:
    5
    Ratings:
    +5 / 0
    Home Country:
    England England
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4

    Yes! It works! :D

    Big thank you to everyone that helped get this fixed. Really appreciated.

    :D
     
  4. drealit

    drealit Portal Pro

    Joined:
    March 15, 2008
    Messages:
    190
    Likes Received:
    17
    Ratings:
    +17 / 0
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4

    And here is the US version which seems to be working fine also:

    • RottenTomatoes Score
    • Short Summary
    • US Certification
     

    Attached Files:

  5. Surferosa

    Surferosa Portal Pro

    Joined:
    September 2, 2009
    Messages:
    55
    Likes Received:
    5
    Ratings:
    +5 / 0
    Home Country:
    England England
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4

    Having lived with this for a while now- just to say its ace. The imdb ratings doesnt really give you anything beyond popularity for reasons I mentioned at the start. This is the closest rankings Ive come across- when we sit down to watch something and we dont want to watch, we usually go for the highest RT scored unwatched movie from whatever genre / year we're after. Works a treat. So thanks agin.

    There is another thread on short or long summaries. A few suggestions have said both- short on list view, long on detail. We'll Id love this to becuase I dont have any need for the long summaries at all; but hopefully someone could amend this script and use it to grab critics write-ups on a film from RT. Would be ace :)
     
  6. Knives03

    Knives03 Portal Pro

    Joined:
    March 6, 2009
    Messages:
    103
    Likes Received:
    2
    Ratings:
    +2 / 0
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4

    The score is still not working correctly for me using the 1.5.6 scraper. I just ran "They Live" through the importer and it gave me a score of 3.3, which isn't even close to the Tomatometer score or the IMDB score. The Tomatometer score is 88% and IMDBs rating is a 7.0 so something is clearly not right because I have no idea where it grabbed that score from.
     
  7. OllieZA

    OllieZA Portal Member

    Joined:
    July 9, 2010
    Messages:
    6
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    South Africa South Africa
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4

    To confirm, I recommended The Machinist to the significant other, but after importing we ended up with a score of 1.3/10. I assured her the system made a mistake! :oops: Likewise, Lemony Snicket's A Series of Unfortunate Events has a score of 1.5. The scraper should have returned scores of 7.5 and 7 respectively.

    Thank you for your efforts.
     
  8. mortstar
    • Premium Supporter

    mortstar MP Donator

    Joined:
    January 30, 2008
    Messages:
    415
    Likes Received:
    41
    Ratings:
    +41 / 0
    Home Country:
    England England
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4

    Just having a look at this....I suspect RottenTomatoes have changed their HTML coding because the score is being created from the number of reviews counted. i.e. I've just imported 'The Girl With the Dragon Tattoo' which has an RT score of 88 from 189 counted reviews and the score is getting assigned as 1.9.

    I've attached a log with debug scraping enabled, looks like we'll need RoChess' help again.

    Current regex is
    Code (Text):
    1. <set name="rx_rotten_rating">
    2.         <![CDATA[
    3.         <span class="per[cf]e[nc]t".+?>(\d{1,3}?)</span>
    4.         ]]>
    5.       </set>
    and the HTML from the example film I am trying to import is
    Code (Text):
    1. <div id="tomatometer" class="dialog chromeGreenMain">
    2.   <div class="dialog_content clearfix" rel="v:rating">
    3.   <div class="t"></div>
    4.   <span typeof="v:Review-aggregate">
    5.   <div id="tomatometer_score" style="" rel="v:rating">
    6.   <span class="percent" property="v:average">
    7.   88</span>
    8.   <span property="v:best" content="100"/>
    9.   <sup class="symbol ">%</sup>
    10.   </div>
    11.   <div id="tomatometer_bar">
    12.   <h6>Tomatometer</h6>
    13.   <div id="tomatometer_bar_container">
    14.   <img class="fl" src="http://images.rottentomatoes.com/images/tomatometer/tomatometer_bar_over_left.png" width="6" height="19" alt="Template Image" />
    15.   <img class="fl" src="http://images.rottentomatoes.com/images/tomatometer/tomatometer_bar_over_middle.gif" width="193.0" height="19" alt="Template Image" />    
    16.   </div>
    17.   <p id="tomatometer_bar_help" class="help" title="The Tomatometer measures the percentage of positive reviews from Approved Tomatometer Critics for a certain movie.">How does the Tomatometer work <img id="rater_mob_helpicon" src="http://images.rottentomatoes.com/images/icons/helpGreen_sm_whitebg.gif" alt="Help Icon" /></p>
    18.   </div>
    19.   <div id="tomatometer_certified_fresh" >
    20.   <span class="iconset iconset_rt_lg certifiedfresh_lg hide" title="Certified Fresh"></span>
    21.   </div>
    22.   <div id="tomatometer_data">
    23.   <p>Reviews Counted:<span property="v:count">189</span></p>
    24.   <p id="tomatometer_data_fresh">Fresh:<span>166</span></p>
    25.   <p id="tomatometer_data_rotten">Rotten:<span>23</span></p>
    26.   <p>Average Rating:<span>7.6/10</span></p>
    27.   </div>
     
  9. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,205
    Likes Received:
    1,320
    Ratings:
    +1,712 / 2
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4

    They indeed changed their HTML code, by adding a lot of useless CR+LF chars, so use:

    Code (Text):
    1.  
    2.   <set name="rx_rotten_rating">
    3.     <![CDATA[
    4.     <span class="per[cf]e[nc]t".+?>.*?(\d{1,3}?)</span>
    5.     ]]>
    6.   </set>
    7.  
    Enjoy.
     
    • Like Like x 1
  10. Knives03

    Knives03 Portal Pro

    Joined:
    March 6, 2009
    Messages:
    103
    Likes Received:
    2
    Ratings:
    +2 / 0
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4

    Thank you very much RoChess, that seems to have fixed the problem! They Live pulled in an 8.8 rating as it should have. Thanks again!
     
  11. Buzzie

    Buzzie Portal Pro

    Joined:
    May 10, 2008
    Messages:
    66
    Likes Received:
    3
    Ratings:
    +3 / 0
    Home Country:
    Netherlands Netherlands
    Re: IMDb Scraper with RottenTomatoes rating v1.4.4

    Is this useable in the StreamedMP Skin??

    and can somebody show some screenshots on how it looks??

    thankss
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!