Home › Media Browser › Fix MPAA & Aspect Ratio Fetching (Updated)
Fix MPAA & Aspect Ratio Fetching (Updated)
meta<browser/> gets its User Rating, MPAA and Aspect Ratio from IMDb by scraping IMDb’s HTML. Recently IMDb changed it’s HTML which broke the fetching of MPAA and Aspect Ratio. Here’s how to fix it…
- Close meta<browser/>
- Browse to C:\ProgramData\MetaBrowser
- Open metabrowseroptions.xml in a text editor
- Replace the <MPAARatingPattern> and <AspectRatioPattern> tags with the following:
- Save metabrowseroptions.xml
- Restart meta<browser/>
<MPAARatingPattern><![CDATA[MPAA</a>:</h5>\n<div class="info-content">\nRated (?<grp1>(.*?)) for ]]></MPAARatingPattern> <AspectRatioPattern><![CDATA[Aspect Ratio:</h5>\n<div class="info-content">\n(?<grp1>(.*?)) <a]]></AspectRatioPattern>


Or for people updating records in WinXP it’s located here:
C:\Documents and Settings\All Users\Application Data\MetaBrowser
This still will not work all the time. The problem is that MANY IMDB posts to not list an MPAA Rating. It would be better to change to code to look at the certification from the country of origin (as each rating differs by county). The Certifications rating is on every IMDB post that I have seen.
I was thinking the code should be modified to include this, but after messing around with it I wasn’t able to make it work. Hopefully < will work it out.
Here’s a possible alternate regex for the MPAA rating that uses the certification instead of looking for the MPAA rating which isn’t present on a lot of movies. It has problems of its own, though. It should be more specific to avoid bad matches. It has an overly specific pattern for the rating itself because there can be multiple USA certifications, and some are useless (like “Approved”) or have been superseded by newer ratings. Ideally, I’d like it to use the last match, but I don’t think this is possible from the regex alone.
<MPAARatingPattern><![CDATA[">\n*USA:(?<grp1>(\w\w?-?\d?\d?))</a>]]></MPAARatingPattern>