**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: mediaset.it * @MinSWversion: V1.1.1/52 * none * @Revision 2 - [21/04/2015] Francis De Paemeleere * adding channel icon * @Revision 1 - [29/09/2014] Francis De Paemeleere * fix pre-6am shwo grabbing * fix actor/dirctor grabbing + remove info from description * @Revision 0 - [09/02/2014] Steve Wildmore * creation * @Remarks: * none * @header_end **------------------------------------------------------------------------------------------------ site {url=mediaset.it|timezone=Europe/Rome|maxdays=7|cultureinfo=it-IT|charset=UTF-8|titlematchfactor=90|episodesystem=onscreen|ratingsystem=MPAA} index_variable_element.modify {calculate(scope=urlindex format=date,yyyyMM)|'urldate'} url_index{url|http://www.mediaset.it/guidatv/inc/canali/######/|urldate|_|channel|.sjson} url_index.modify {replace|######|'index_variable_element'} urldate.format {datestring|yyyyMMdd} * index_showsplit.scrub {multi(separator="},")|{"events":|[|]|} index_showsplit.modify {replace|}|} index_urlchannellogo.modify {addstart|http://www.mediaset.it/include/img/loghi/'config_site_id'.png} index_start.scrub {single|"startTime":"||"|"} index_stop.scrub {single|"endTime":"||"|"} index_title.scrub {regex||"displayTitle"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} index_category.scrub {regex||"genere"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} index_category.scrub {regex||"sottogenere"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} index_temp_1.scrub {regex||"channel"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} * http://servizi.mediaset.it/Contenuti/guidaTv/programDetails.jsp?programId=201402072112_C5&jsoncallback=? index_urlshow {url|servizi.mediaset.it/Contenuti/guidaTv/programDetails.jsp?programId=########|"startTime":"||"|"} index_temp_2.modify {calculate(format=date,yyyyMMdd)|'showdate'} index_temp_2.modify {calculate('index_start' < "06:00" format=date,yyyyMMdd)|'showdate' 01:00 -} * shows before 6am, are called by the previous day index_urlshow.modify {replace|########|'index_temp_2'} index_urlshow.modify {addend|_'index_temp_1'&jsoncallback=?} index_urlshow.modify {replace|:|} index_urlshow.modify {addstart|http://} index_title.modify {remove(type=regex)|"\s*-\s*PRIMA TV\s*"} index_title.modify {remove(type=regex)|"\s*\(\s*DI\s+[^)]*\)"} title.scrub {regex||"displayTitle"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} title.modify {remove(type=regex)|"\s*\(\s*DI\s+[^)]*\)"} description.scrub {regex||"trama"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} temp_1.scrub {regex||"description"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} description.modify {addend| 'temp_1'} description.modify {cleanup(style=jsondecode)} productiondate.scrub {regex||"anno"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} premiere.scrub {regex||"prima"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} premiere.modify {replace('title' ~ "PRIMA TV")|'premiere'|true} title.modify {remove(type=regex)|"\s*-\s*PRIMA TV\s*"} director.scrub {regex||Regia:\s*(.*?)\s*-||} * director info form description director.scrub {regex||"regia"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"||} * director info form json data director.modify {replace|,|;} director.modify {replace|;|\|} director.modify {replace|.|. } director.modify {replace| | } director.modify {cleanup(style=name)} director.modify {cleanup(removeduplicates=name)} actor.scrub {regex||Cast:(?:\s(.*?),)*\s*(.*?(?:\w{3,}))(?:\s+-\s+\|\.)||} * actor info form description actor.scrub {regex||cast"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)||} * actor info form json data actor.modify {replace|,|;} actor.modify {replace|;|\|} actor.modify {replace|.|. } actor.modify {replace| | } actor.modify {cleanup(style=name)} actor.modify {cleanup(removeduplicates=name)} description.modify {remove(type=regex)|Regia:\s*.*? - } description.modify {remove(type=regex)|(Cast:(?:\s(?:.*?),)*\s*.*?(?:\w{3,})(?:\s+-\s+\|\.))} * rating rating.modify {addstart('description' ~ "VISIONE ADATTA A TUTTI")|G} rating.modify {addstart('description' ~ "VISIONE CONSIGLIATA CON LA PRESENZA DI UN ADULTO")|PG} rating.modify {addstart('description' ~ "VISIONE CONSIGLIATA AL SOLO PUBBLICO ADULTO")|R} rating.modify {addstart('description' ~ "VIETATO AI MINORI DI 14 ANNI")|PG-13} rating.modify {addstart('description' ~ "VIETATO AI MINORI DI 18 ANNI")|PG-17} description.modify {remove(type=regex)|\s*VISIONE ADATTA A TUTTI\s*\.\s*} description.modify {remove(type=regex)|\s*VISIONE CONSIGLIATA CON LA PRESENZA DI UN ADULTO\s*\.\s*} description.modify {remove(type=regex)|\s*VISIONE CONSIGLIATA AL SOLO PUBBLICO ADULTO\s*\.\s*} description.modify {remove(type=regex)|\s*VIETATO AI MINORI DI 14 ANNI\s*\.\s*} description.modify {remove(type=regex)|\s*VIETATO AI MINORI DI 18 ANNI\s*\.\s*} * ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *url_index{url|http://www.mediaset.it/guidatv/} *index_site_channel.scrub {multi(exclude="tutte")|} *index_site_id.scrub {multi|} *scope.range {(channellist)|end} *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} *end_scope ** @auto_xml_channel_end