Each year my friends and I do a pool where we guess the Rotten Tomatoes review percentage of a random mix of movies being released in the summer. We have a spreadsheet that keeps track of everyone's guess and calculates scores on the fly. The spreadsheet scrapes Rotten Tomatoes for that percentage. Due to COVID we didn't play last year, but I'm updating the spreadsheet for this summer's movies and I'm having an issue scraping the data.
URL of the movie I'm using in this example: https://www.rottentomatoes.com/m/wrath_of_man
Here is the ImportXML I used in 2019:
=index(ImportXML("https://www.rottentomatoes.com/m/wrath_of_man", "//span[@class='mop-ratings-wrap__percentage']"),1,1)*100
I'm digging through the source on Rotten Tomatoes and things have changed a bit, but I can't quite figure out how to grab the # I want. I've played around a bunch capturing different spans and divs, but I must be missing something.
I'm not sure if this is the right spot for it, but the % appears in these two sections:
<div class="score-icon-critic right">
<span class="icon fresh big"></span>
<span class="percentage big" data-qa="tomatometer">70%</span>
</div>
<div class="score-icon-critic left">
<span class="icon fresh medium"></span>
<span class="percentage medium" data-qa="tomatometer">70%</span>
</div>
Any help would be appreciated! Thanks.