2012-09-21, 21:43
Hello!
I made some modifications to the current metadata.common.imdb.com\imdb.xml (on XBMC 11) to enhance the return of parental ratings.
The most recent version of the ParseIMDBUSACERT function only captures data from the MPAA portion of the IMDB details page. As it turns out, the MPAA rating and TV ratings are more often posted at the top. This enhancement processes both sections of the page, with preference given to the MPAA description, if it exists.
This code now returns ratings that would not be returned with the current MPAA parser, including, but not limited to:
TV-G, TV-Y7, TV-PG, TV-MA (,etc)
UNRATED,
APPROVED (an MPAA rating prior to Nov 1, 1968)
(other MPAA ratings that the editor included at the top, but not in the MPAA section)
Many thanks to Scudlee for helping me with the regex to get the desired results.
Please let me know if this is not the correct forum to post media scraper change submissions.
Thanks!
AT2010
I made some modifications to the current metadata.common.imdb.com\imdb.xml (on XBMC 11) to enhance the return of parental ratings.
The most recent version of the ParseIMDBUSACERT function only captures data from the MPAA portion of the IMDB details page. As it turns out, the MPAA rating and TV ratings are more often posted at the top. This enhancement processes both sections of the page, with preference given to the MPAA description, if it exists.
This code now returns ratings that would not be returned with the current MPAA parser, including, but not limited to:
TV-G, TV-Y7, TV-PG, TV-MA (,etc)
UNRATED,
APPROVED (an MPAA rating prior to Nov 1, 1968)
(other MPAA ratings that the editor included at the top, but not in the MPAA section)
Many thanks to Scudlee for helping me with the regex to get the desired results.
Please let me know if this is not the correct forum to post media scraper change submissions.
Thanks!
AT2010
Code:
<ParseIMDBUSACert dest="5">
<RegExp input="$$2" output="<details><mpaa>\1</mpaa></details>" dest="5">
<RegExp input="$$1" output="\1" dest="16">
<expression>class="absmiddle" title="([^"]*)"</expression>
</RegExp>
<RegExp input="$$16" output="\2" dest="16">
<expression noclean="1">(NOT_RATED)?(.*)</expression>
</RegExp>
<RegExp input="$$16" output="$INFO[certprefix]\1" dest="2">
<RegExp input="$$16" output="-\1" dest="16">
<expression clear="yes" repeat="yes" noclean="1">_?([^_]+)</expression>
</RegExp>
<expression noclean="1">-(.*)</expression>
</RegExp>
<RegExp input="$$1" output="$INFO[certprefix]\1" dest="2">
<expression>MPAA</a>\)</h4>\n?<span itemprop="contentRating">Rated\s([^<]*)</expression>
</RegExp>
<expression noclean="1" />
</RegExp>
</ParseIMDBUSACert>