diff --git a/config/WebGrab++.config.xml b/config/WebGrab++.config.xml new file mode 100644 index 0000000..3afd3fc --- /dev/null +++ b/config/WebGrab++.config.xml @@ -0,0 +1,116 @@ + + + + + + /storage/.kodi/userdata/addon_data/service.webgrabplus/guide.xml + + + m + + + mdb + + +automatic + + +Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; yie9) + + + + on + + + 4 + + + +noskip + + + 0 + + + + + + + + + + + + + diff --git a/config/chans2correct.xml b/config/chans2correct.xml new file mode 100644 index 0000000..93edfa7 --- /dev/null +++ b/config/chans2correct.xml @@ -0,0 +1,12 @@ + + + diff --git a/config/guide.xml b/config/guide.xml new file mode 100644 index 0000000..8997a03 --- /dev/null +++ b/config/guide.xml @@ -0,0 +1,3 @@ + + + diff --git a/config/mdb/imdb.com.ask.ini b/config/mdb/imdb.com.ask.ini new file mode 100644 index 0000000..0b89c3b --- /dev/null +++ b/config/mdb/imdb.com.ask.ini @@ -0,0 +1,61 @@ +* WebGrab+Plus ini for grabbing IMDB data from TvGuide websites +* Site : imdb.com, primary search with ask.com +* revision : 1 correction in production date +* Jan van Straaten, 14/04/2012 +* +site {url=imdb.com|cultureinfo=en-GB|charset=UTF-8|matchfactor=60|searchsite=ask} +* primary search: +http://www.ask.com/web?&q=imdb%2bDer+grosse+Edison%2b%2bClarence+Brown&/NCR +*url_primarysearch {url(urlencode=1,2,3,4,5,6)|http://www.ask.com/web?&q=|imdb+|'title'|+|'productiondate'|+|'credit'|&/NCR} +url_primarysearch {url(debug urlencode=1,2,3,4)|http://www.ask.com/web?&q=|imdb+|'title'|+|'credit'|&/NCR} +show_id.scrub {multi|primary|imdb|/tt|/|onmousedown} +* +show_id.modify {remove| } * remove spaces +* filter showid (7 char long): +mdb_temp_1.modify {calculate(type=element format=F0)|'show_id' #} * number of show_id's = loop index +loop {('mdb_temp_1' > "0" max=50)|4} +mdb_temp_1.modify {calculate(format=F0)|1 -} * decrease index +mdb_temp_2.modify {substring(type=element)|'show_id' 'mdb_temp_1' 1} * the showid to inspect +mdb_temp_3.modify {calculate(type=char format=F0)|'mdb_temp_2' #} * how many chars in this show_id? +show_id.modify {remove('mdb_temp_3' not "7" type=element)|'show_id' 'mdb_temp_1' 1} * remove this show_id if not 7 chars +* end loop +* filter showid (only numbers and < 2500000): +mdb_temp_1.modify {calculate(type=element format=F0)|'show_id' #} * number of show_id's = loop index +loop {('mdb_temp_1' > "0" max=50)|5} +mdb_temp_1.modify {calculate(format=F0)|1 -} * decrease index +mdb_temp_2.modify {substring(type=element)|'show_id' 'mdb_temp_1' 1} * the showid to inspect +mdb_temp_3.modify {calculate(format=F0)|'mdb_temp_2'} * convert to number +show_id.modify {remove('mdb_temp_3' "0" type=element)|'show_id' 'mdb_temp_1' 1} * remove this show_id if not only numbers +show_id.modify {remove('mdb_temp_3' > "2500000" type=element)|'show_id' 'mdb_temp_1' 1} * remove this show_id if > 2500000 +* end loop +* +* imdb url's: +url_mdb_p1 {url|primary|http://www.imdb.com/title/tt|show_id|/} +*url_mdb_p1 {url|primary|http://www.imdb.com/find?q=tt|show_id|&s=all} +*http://www.imdb.com/find?q=tt2200000&s=all +*url_mdb_p2.modify {addstart|'url_mdb_p1'plotsummary} +*url_mdb_p3.modify {addstart|'url_mdb_p1'releaseinfo#akas} +*url_mdb_p4.modify {addstart|'url_mdb_p1'reviews} +*url_mdb_p5.modify {addstart|'url_mdb_p1'fullcredits#cast} +* +url_mdb_p2 {url|primary|http://www.imdb.com/title/tt|show_id|/plotsummary} +url_mdb_p3 {url|primary|http://www.imdb.com/title/tt|show_id|/releaseinfo#akas} +url_mdb_p4 {url|primary|http://www.imdb.com/title/tt|show_id|/reviews} +url_mdb_p5 {url|primary|http://www.imdb.com/title/tt|show_id|/fullcredits#cast} +* +* imdb elements +mdb_title.scrub {single|p1||||} * original title when redirected +mdb_title.scrub {single(separator=" - " exclude="IMDb" include=first)|p1|||(|} +mdb_title.scrub {multi(separator=" - ")|p3|
Also Known As (AKA)
|\n||} *aka's +*mdb_productiondate.scrub {single|p1||(|)|} +mdb_productiondate.scrub {single|p1||||} +mdb_actor.scrub {multi|p1|itemprop="actors"|>||} +mdb_actor.scrub {multi(exclude="||} * full list +mdb_director.scrub {multi|p1|itemprop="director"|>||} +mdb_director.scrub {multi|p5|Directed by|/">||} * fulllist +mdb_starrating.scrub {single|p1|Ratings:|itemprop="ratingValue">||from} +mdb_starratingvotes.scrub {single|p1|Ratings:|itemprop="ratingCount">||users} +mdb_commentsummary.scrub {multi(max=5 exclude="This review may contain spoilers")|p4||||Add another review} +mdb_review.scrub {multi(exclude="SPOILERS ARE INCLUDED" include=first)|p4||

\n

|

\n\n|
|||} +mdb_description.scrub {single|p1|| "0" max=50)|4} +mdb_temp_1.modify {calculate(format=F0)|1 -} * decrease index +mdb_temp_2.modify {substring(type=element)|'show_id' 'mdb_temp_1' 1} * the showid to inspect +mdb_temp_3.modify {calculate(type=char format=F0)|'mdb_temp_2' #} * how many chars in this show_id? +show_id.modify {remove('mdb_temp_3' not "7" type=element)|'show_id' 'mdb_temp_1' 1} * remove this show_id if not 7 chars +* end loop +* filter showid (only numbers and < 2500000): +mdb_temp_1.modify {calculate(type=element format=F0)|'show_id' #} * number of show_id's = loop index +loop {('mdb_temp_1' > "0" max=50)|5} +mdb_temp_1.modify {calculate(format=F0)|1 -} * decrease index +mdb_temp_2.modify {substring(type=element)|'show_id' 'mdb_temp_1' 1} * the showid to inspect +mdb_temp_3.modify {calculate(format=F0)|'mdb_temp_2'} * convert to number +show_id.modify {remove('mdb_temp_3' "0" type=element)|'show_id' 'mdb_temp_1' 1} * remove this show_id if not only numbers +show_id.modify {remove('mdb_temp_3' > "2500000" type=element)|'show_id' 'mdb_temp_1' 1} * remove this show_id if > 2500000 +* end loop +* +* imdb url's: +url_mdb_p1 {url|primary|http://www.imdb.com/title/tt|show_id|/} +*url_mdb_p2.modify {addstart|'url_mdb_p1'plotsummary} +*url_mdb_p3.modify {addstart|'url_mdb_p1'releaseinfo#akas} +*url_mdb_p4.modify {addstart|'url_mdb_p1'reviews} +*url_mdb_p5.modify {addstart|'url_mdb_p1'fullcredits#cast} +* +url_mdb_p2 {url|primary|http://www.imdb.com/title/tt|show_id|/plotsummary} +url_mdb_p3 {url|primary|http://www.imdb.com/title/tt|show_id|/releaseinfo#akas} +url_mdb_p4 {url|primary|http://www.imdb.com/title/tt|show_id|/reviews} +url_mdb_p5 {url|primary|http://www.imdb.com/title/tt|show_id|/fullcredits#cast} +* +* imdb elements +mdb_title.scrub {single|p1||||} * original title when redirected +mdb_title.scrub {single(separator=" - " exclude="IMDb" include=first)|p1|||(|} +mdb_title.scrub {multi(separator=" - ")|p3|
Also Known As (AKA)
|\n||} *aka's +mdb_productiondate.scrub {single|p1||||} +mdb_actor.scrub {multi|p1|itemprop="actors"|>||
} +mdb_actor.scrub {multi(exclude="||} * full list +mdb_director.scrub {multi|p1|itemprop="director"|>||} +mdb_director.scrub {multi|p5|Directed by|/">||} * fulllist +mdb_starrating.scrub {single|p1|Ratings:|itemprop="ratingValue">||from} +mdb_starratingvotes.scrub {single|p1|Ratings:|itemprop="ratingCount">||users} +mdb_commentsummary.scrub {multi(max=5 exclude="This review may contain spoilers")|p4||||Add another review} +mdb_review.scrub {multi(exclude="SPOILERS ARE INCLUDED" include=first)|p4||

\n

|

\n\n|
|||} +mdb_description.scrub {single|p1|| "0" max=50)|4} +mdb_temp_1.modify {calculate(format=F0)|1 -} * decrease index +mdb_temp_2.modify {substring(type=element)|'show_id' 'mdb_temp_1' 1} * the showid to inspect +mdb_temp_3.modify {calculate(type=char format=F0)|'mdb_temp_2' #} * how many chars in this show_id? +show_id.modify {remove('mdb_temp_3' not "7" type=element)|'show_id' 'mdb_temp_1' 1} * remove this show_id if not 7 chars +* end loop +* filter showid (only numbers and < 2500000): +mdb_temp_1.modify {calculate(type=element format=F0)|'show_id' #} * number of show_id's = loop index +loop {('mdb_temp_1' > "0" max=50)|5} +mdb_temp_1.modify {calculate(format=F0)|1 -} * decrease index +mdb_temp_2.modify {substring(type=element)|'show_id' 'mdb_temp_1' 1} * the showid to inspect +mdb_temp_3.modify {calculate(format=F0)|'mdb_temp_2'} * convert to number +show_id.modify {remove('mdb_temp_3' "0" type=element)|'show_id' 'mdb_temp_1' 1} * remove this show_id if not only numbers +show_id.modify {remove('mdb_temp_3' > "2500000" type=element)|'show_id' 'mdb_temp_1' 1} * remove this show_id if > 2500000 +* end loop +* +* imdb url's: +url_mdb_p1 {url|primary|http://www.imdb.com/title/tt|show_id|/} +*url_mdb_p2.modify {addstart|'url_mdb_p1'plotsummary} +*url_mdb_p3.modify {addstart|'url_mdb_p1'releaseinfo#akas} +*url_mdb_p4.modify {addstart|'url_mdb_p1'reviews} +*url_mdb_p5.modify {addstart|'url_mdb_p1'fullcredits#cast} +* +url_mdb_p2 {url|primary|http://www.imdb.com/title/tt|show_id|/plotsummary} +url_mdb_p3 {url|primary|http://www.imdb.com/title/tt|show_id|/releaseinfo#akas} +url_mdb_p4 {url|primary|http://www.imdb.com/title/tt|show_id|/reviews} +url_mdb_p5 {url|primary|http://www.imdb.com/title/tt|show_id|/fullcredits#cast} +* +* imdb elements +mdb_title.scrub {single|p1||||} * original title when redirected +mdb_title.scrub {single(separator=" - " exclude="IMDb" include=first)|p1|||(|} +*mdb_title.scrub {multi(separator=" - ")|p3|
Also Known As (AKA)
|\n||} *aka's +mdb_title.scrub {multi|p3|
Also Known As (AKA)
|\n||} *aka's +mdb_productiondate.scrub {single|p1||||} +mdb_actor.scrub {multi|p1|itemprop="actors"|>||
} +mdb_actor.scrub {multi(exclude="||} * full list +mdb_director.scrub {multi|p1|itemprop="director"|>||} +mdb_director.scrub {multi|p5|Directed by|/">||} * fulllist +mdb_starrating.scrub {single|p1|Ratings:|itemprop="ratingValue">||from} +mdb_starratingvotes.scrub {single|p1|Ratings:|itemprop="ratingCount">||users} +mdb_commentsummary.scrub {multi(max=5 exclude="This review may contain spoilers")|p4||||Add another review} +mdb_review.scrub {multi(exclude="SPOILERS ARE INCLUDED" include=first)|p4||

\n

|

\n\n|
|||} +mdb_description.scrub {single|p1|| + + + + + imdb.com.ask, imdb.com.imdb + + + /storage/.kodi/userdata/addon_data/service.webgrabplus/mdb/guide.xml + + + /storage/.kodi/userdata/addon_data/service.webgrabplus/mdb/mdb.xml + + + + + + + + + + +. The individual values will be listed with a (standard WG++ internal element separator) | as separator unless another separator is specified as follows: +'element-name(separator-string)' e.g. 'actor(, )' + - text and element-names can be linked together by enclosing them by {}. This will ensure that, when the element in it is empty, everything between the {} is ignored. E.g. {\nProduced in : ('productiondate')} + - the text in the xmltv-target elements may contain the following simple formatting : + - \n or \r to force a newline + - \t to add a tab +2. The allowed xmltv-target elements (the ones in the target file specified above) are : + (= special case : if the first mdb-title, which is the original showtitle, differs from the xmltv title it can be added to xmltv as extra 'original' title.) + <sub-title> + <desc> + <date> = the xmltv element name containing the productiondate + <star-rating> + <review> (=optional new xmltv element) + <director> e.g to add /substitute the (additional?) mdb-director + <actor> e.g to add /substitute the (additional?) mdb-actor + - IMPORTANT! : any of the above listed xmltv-target elements that is specified in this allocation specification, replaces the existing xmltv element and its content! +3. Supported element-names (from the existing xmltv listing, name definitions as in Appendix D) : + - 'title' 'description' 'starrating' 'subtitle' 'productiondate' 'category' 'director' 'actor' 'presenter' 'writer' 'composer' 'producer' 'rating' 'episode' 'review' 'subtitles' 'premiere' previously-shown' 'aspect' 'quality' +4. Supported MDB element-names + - 'mdb-title' : + If 'mdb-title' is used in the xmltv-target element <title>, it will only be added if different from the existing xmltv title (see 2. above) + If used in any of the other supported xmltv-target elements, there is no such restriction and it will be listed in any case. + - 'mdb-starrating' 'mdb-description' 'mdb-plot' 'mdb-commentsummary' +5. Attributes (might need completion) + - for each of the xmltv-elements the following attribute can be specified + (if not specified the existing one, if present in the xmltv, will be used) : + - lang for <title> and <desc> , default : no attribute + - system for <star-rating> , default : no attribute + - type for <review> , default: type="text" ]]> + + <!--mdb-starrating correction: +allows to convert the mdb-starrating into a value that suits a media-center starrating display. E.g. , the majority of the IMDb starrating values are between 4 (bad) and 8 (good) in a scale of 10. In a 5 star display system , like the one in MCE, there is too little difference between these values. +The following settings, first subtracts 4 from the grabbed mdb-starrating and multiplies the result by 1.2 with a maximum of 5 . That will convert the values above, in 0 (was 4) and 5 (was 8) + Default values: subtract="0" multiply="1" and max="10"--> + <mdb-starrating subtract="4" multiply="1.2" max="5" /> + + <!--The next two lines add mdb-title (if different) as an extra <title> element before the existing one: --> + <title lang="xx">'mdb-title' + 'title' + + + {'mdb-title'...}{[plot: 'mdb-plot']\n}'description'{\n[imdb description: 'mdb-description']} + + + 'starrating' + 'mdb-starrating' + + + + + {Viewers comments : 'mdb-commentsummary( ... )'} + {IMDb review: 'mdb-review'} + + + Disney Channel + RTL 4 + + diff --git a/config/rex/rex.config.xml b/config/rex/rex.config.xml new file mode 100644 index 0000000..1b62ba3 --- /dev/null +++ b/config/rex/rex.config.xml @@ -0,0 +1,127 @@ + + + + + + + /storage/.kodi/userdata/addon_data/service.webgrabplus/rex/guide.xml + + + + 'description'\n'actor' + The result is the existing 'description' , followed by, on a newline, the actor(s) separated by the standard WG++ element separator | . + The result: + This is the original description. + Michael Douglas|Kim Basinger + + You probably don't like the | as separator between the actors, so you specify anther separator like this: + 'description'\n'actor(, )' + The result: + This is the original description. + Michael Douglas, Kim Basinger + + You can make this prettier by adding some text to the actors addition: + 'description'\nActors: 'actor(, )'. + The result: + This is the original description. + Actors: Michael Douglas, Kim Basinger. + + A small problem: Suppose the source xmltv show doesn't have any actors, then the result would be not so pretty: + This is the original description. + Actors: . + To avoid that, the added text can be linked to the element it must be added to, like this: + 'description'{\nActors: 'actor(, )'.} + Result with actors: + This is the original description. + Actors: Michael Douglas, Kim Basinger. + And without actors: + This is the original description. + + An example with some more elements: + 'description'{\n\tYear of production: 'productiondate'.}{\n\tProducer: 'producer(, )'.}{\n\tActors: 'actor(, )'.} + Result: + This is the original description. + Year of production: 2002. + Producer: Steven Spielberg. + Actors: Michael Douglas, Kim Basinger. + + And another one: + {Episode: 'episode'\t}'subtitle' + Result: + Episode: 3.2/12.1 The original subtitle + + You can also remove elements (but not the title!) from the xmltv listing by specifying an empty element, like this: + + This will remove all elements + And this: + + Will remove the element, including all its child elements like , etc. ]]> +. The individual values will be listed with a (standard WG++ internal element separator) | as separator unless another separator is specified as follows: +'element-name(separator-string)' e.g. 'actor(, )' + - text and element-names can be linked together by enclosing them by {}. This will ensure that, when the element in it is empty, everything between the {} is ignored. E.g. {\nProduced in : ('productiondate')} +- the text in the xmltv-target elements may contain the following simple formatting : + - \n or \r to force a newline + - \t to add a tab + +2. The allowed xmltv-target elements (the ones in the target file specified above) are : + + <sub-title> + <desc> + <date> = the xmltv element name containing the productiondate + <star-rating> + <review> (=optional new xmltv element) + <director> e.g to add /substitute the (additional?) mdb-director + <actor> e.g to add /substitute the (additional?) mdb-actor +- IMPORTANT! : any of the above listed xmltv-target elements that is specified in this allocation specification, replaces the existing xmltv element and its content! + +3. Supported element-names (from the existing xmltv listing, name definitions as in Appendix D) : + - 'title' 'description' 'starrating' 'subtitle' 'productiondate' 'category' 'director' 'actor' 'presenter' 'writer' 'composer' 'producer' 'rating' 'episode' 'review' 'subtitles' 'premiere' 'previously-shown' 'aspect' 'quality' + +4. Also supported are the additional elements created by the MDB-postprocessor. +- Important : This MDB-postprocessor automatically makes use of this REX-postprocessor. In that case the REX-postprocessor uses the allocation specification from the MDB config file mdb.config.xml and ignores the specification entered here. + - 'mdb-title' +(if used in the xmltv-target element <title> it will only be added if different from the existing xmltv title, see for more details mdb.config.xml) + - 'mdb-starrating' 'mdb-description' 'mdb-plot' 'mdb-commentsummary' 'mdb-review' + +5. Attributes (might need completion) + - for each of the xmltv-elements the following attribute can be specified + (if not specified, the existing one, if present in the xmltv, will be used) : + - lang for <title> and <desc> , default : no attribute + - system for <star-rating> , default : no attribute + - type for <review> , default: type="text"]]> + +<!--An example setting --> + <sub-title>{Episode: 'episode' }'subtitle'</sub-title> + <desc>'description'{\n\t¤ Produced in: 'productiondate'. }{¤ Category: 'category(, )'. }{\n\t¤ Actors: 'actor(, )'}{\n\t¤ Director: 'director(, )'}{\n\t¤ Presenter: 'presenter(, )'}</desc> + <credits></credits> + <episode-num></episode-num> + <date></date> + <category></category> + <review>{Ratings: 'rating(, )'.}</review> + <rating></rating> +</settings> +