150 lines
8.9 KiB
XML
150 lines
8.9 KiB
XML
<scraperfunctions>
|
|
|
|
<!-- Get Rotten Tomatoes Rating as Default (requires Kodi Krypton) usage: imdb_id|default=TomatoMeter All Critics or TomatoMeter Audience Score or Average Rating All Critics or Average Rating Audience Score -->
|
|
<GetRTDefaultRatingById dest="5" clearbuffers="no">
|
|
<RegExp input="$$1" output="<details><url function="ParseRTDefaultRating" cache="\1-omdbapi.html">http://www.omdbapi.com/?i=tt\1&apikey=$INFO[omdbapikey2]&r=xml&tomatoes=true</url></details>" dest="5">
|
|
<RegExp input="$$1" output="\1" dest="3">
|
|
<expression clear="yes">\|(default=.*?)$</expression>
|
|
</RegExp>
|
|
<expression>(\d+)</expression>
|
|
</RegExp>
|
|
</GetRTDefaultRatingById>
|
|
|
|
<!-- Get all Rotten Tomatoes Rating as non-default ratings > Krypton -->
|
|
<GetRTRatingsById dest="5">
|
|
<RegExp input="$$1" output="<details><url function="ParseRTRatings" cache="\1-omdbapi.html">http://www.omdbapi.com/?i=tt\1&apikey=$INFO[omdbapikey2]&r=xml&tomatoes=true</url></details>" dest="5">
|
|
<expression>(\d+)</expression>
|
|
</RegExp>
|
|
</GetRTRatingsById>
|
|
|
|
<!-- Parse requested TomatoMeter rating as default rating (requires Krypton) -->
|
|
<ParseRTDefaultRating dest="5">
|
|
<RegExp input="$$2" output="<details><ratings>\1</ratings></details>" dest="5">
|
|
<RegExp input="" output="" dest="2">
|
|
<expression />
|
|
</RegExp>
|
|
<RegExp input="$$3" output="$$8" dest="2+">
|
|
<RegExp input="$$1" output="<rating name="tomatometerallcritics" max="100" default="true"><value>\1</value><votes>\2</votes></rating>" dest="8">
|
|
<expression noclean="1">tomatoMeter="([^"]+)".*?tomatoReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
<expression>(default=TomatoMeter All Critics)$</expression>
|
|
</RegExp>
|
|
<RegExp input="$$3" output="$$8" dest="2+">
|
|
<RegExp input="$$1" output="<rating name="tomatometerallaudience" max="100" default="true"><value>\1</value><votes>\2</votes></rating>" dest="8">
|
|
<expression noclean="1">tomatoUserMeter="([^"]+)".*?tomatoUserReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
<expression>(default=TomatoMeter Audience Score)$</expression>
|
|
</RegExp>
|
|
<RegExp input="$$3" output="$$8" dest="2+">
|
|
<RegExp input="$$1" output="<rating name="tomatometeravgcritics" max="100" default="true"><value>\1</value><votes>\2</votes></rating>" dest="8">
|
|
<expression noclean="1">tomatoRating="([^"]+)".*?tomatoReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
<expression>(default=Average Rating All Critics)$</expression>
|
|
</RegExp>
|
|
<RegExp input="$$3" output="$$8" dest="2+">
|
|
<RegExp input="$$1" output="<rating name="tomatometeravgaudience" max="100" default="true"><value>\1</value><votes>\2</votes></rating>" dest="8">
|
|
<expression noclean="1">tomatoUserRating="([^"]+)".*?tomatoUserReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
<expression>(default=Average Rating Audience Score)$</expression>
|
|
</RegExp>
|
|
<expression noclean="1" />
|
|
</RegExp>
|
|
</ParseRTDefaultRating>
|
|
|
|
<!-- Parse All TomatoMeter ratings as non-default ratings (requires Krypton) -->
|
|
<ParseRTRatings dest="5">
|
|
<RegExp input="$$2" output="<details><ratings>\1</ratings></details>" dest="5">
|
|
<RegExp input="$$1" output="<rating name="tomatometerallcritics" max="100"><value>\1</value><votes>\2</votes></rating>" dest="2">
|
|
<expression noclean="1">tomatoMeter="([^"]+)".*?tomatoReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
<RegExp input="$$1" output="<rating name="tomatometerallaudience" max="100"><value>\1</value><votes>\2</votes></rating>" dest="2+">
|
|
<expression noclean="1">tomatoUserMeter="([^"]+)".*?tomatoUserReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
<RegExp input="$$1" output="<rating name="tomatometeravgcritics" ><value>\1</value><votes>\2</votes></rating>" dest="2+">
|
|
<expression noclean="1">tomatoRating="([^"]+)".*?tomatoReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
<RegExp input="$$1" output="<rating name="tomatometeravgaudience" max="5" ><value>\1</value><votes>\2</votes></rating>" dest="2+">
|
|
<expression noclean="1">tomatoUserRating="([^"]+)".*?tomatoUserReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
<expression noclean="1" />
|
|
</RegExp>
|
|
</ParseRTRatings>
|
|
|
|
<!-- Critics' Consensus -->
|
|
<GetRTOutlineById dest="5">
|
|
<RegExp input="$$1" output="<details><url function="ParseRTOutline$$10" cache="\1-omdbapi.html">http://www.omdbapi.com/?i=tt\1&apikey=$INFO[omdbapikey]&r=xml&tomatoes=true</url></details>" dest="5">
|
|
<expression>(\d+)</expression>
|
|
</RegExp>
|
|
</GetRTOutlineById>
|
|
<ParseRTOutline dest="5">
|
|
<RegExp input="$$1" output="<details><outline>\1</outline></details>" dest="5">
|
|
<expression trim="1" noclean="1">tomatoConsensus="([^"]+)"</expression>
|
|
</RegExp>
|
|
<RegExp input="$$5" output="" dest="5">
|
|
<expression><details><outline>No consensus yet.</outline></details></expression>
|
|
</RegExp>
|
|
</ParseRTOutline>
|
|
|
|
<!-- Critics' Consensus -->
|
|
<GetRTCConsensusToPlotById dest="5">
|
|
<RegExp input="$$1" output="<details><url function="ParseRTCConsensusToPlot$$10" cache="\1-omdbapi.html">http://www.omdbapi.com/?i=tt\1&apikey=$INFO[omdbapikey]&r=xml&tomatoes=true</url></details>" dest="5">
|
|
<expression>(\d+)</expression>
|
|
</RegExp>
|
|
</GetRTCConsensusToPlotById>
|
|
<ParseRTCConsensusToPlot dest="5">
|
|
<RegExp input="$$1" output="<details><plot>\1</plot></details>" dest="5">
|
|
<expression trim="1" noclean="1">tomatoConsensus="([^"]+)"</expression>
|
|
</RegExp>
|
|
<RegExp input="$$5" output="" dest="5">
|
|
<expression><details><plot>No consensus yet.</plot></details></expression>
|
|
</RegExp>
|
|
</ParseRTCConsensusToPlot>
|
|
|
|
<!-- Function for pre-Krypton releases. Usage: imdb_id -->
|
|
<GetRTRatingById dest="5">
|
|
<RegExp input="$$1" output="<details><url function="ParseRT$$10" cache="\1-omdbapi.html">http://www.omdbapi.com/?i=tt\1&apikey=$INFO[omdbapikey]&r=xml&tomatoes=true</url></details>" dest="5">
|
|
<RegExp input="$INFO[tomato]" output="Tom" dest="10">
|
|
<expression>TomatoMeter</expression>
|
|
</RegExp>
|
|
<RegExp input="$INFO[tomato]" output="Ave" dest="10">
|
|
<expression>Average Rating</expression>
|
|
</RegExp>
|
|
<RegExp input="$INFO[allcritics]" output="All" dest="10+">
|
|
<expression>All Critics</expression>
|
|
</RegExp>
|
|
<RegExp input="$INFO[allcritics]" output="Aud" dest="10+">
|
|
<expression>Audience Score</expression>
|
|
</RegExp>
|
|
<expression>(\d+)</expression>
|
|
</RegExp>
|
|
</GetRTRatingById>
|
|
|
|
<!-- Parse TomatoMeter from All Critics (compatibility legacy for pre-Krypton) -->
|
|
<ParseRTTomAll dest="5">
|
|
<RegExp input="$$1" output="<details><rating max="100">\1</rating><votes>\2</votes></details>" dest="5">
|
|
<expression noclean="1">tomatoMeter="([^"]+)".*?tomatoReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
</ParseRTTomAll>
|
|
|
|
<!-- Parse TomatoMeter from Audience (compatibility legacy for pre-Krypton) -->
|
|
<ParseRTTomAud dest="5">
|
|
<RegExp input="$$1" output="<details><rating max="100">\1</rating><votes>\2</votes></details>" dest="5">
|
|
<expression noclean="1">tomatoUserMeter="([^"]+)".*?tomatoUserReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
</ParseRTTomAud>
|
|
|
|
<!-- Parse Average Rating from All Critics (compatibility legacy for pre-Krypton) -->
|
|
<ParseRTAveAll dest="5">
|
|
<RegExp input="$$1" output="<details><rating>\1</rating><votes>\2</votes></details>" dest="5">
|
|
<expression noclean="1">tomatoRating="([^"]+)".*?tomatoReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
</ParseRTAveAll>
|
|
|
|
<!-- Parse Average Rating from Audience (compatibility legacy for pre-Krypton) -->
|
|
<ParseRTAveAud dest="5">
|
|
<RegExp input="$$1" output="<details><rating max="5">\1</rating><votes>\2</votes></details>" dest="5">
|
|
<expression noclean="1">tomatoUserRating="([^"]+)".*?tomatoUserReviews="([^"]+)</expression>
|
|
</RegExp>
|
|
</ParseRTAveAud>
|
|
|
|
</scraperfunctions> |