**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: telerama.fr * @MinSWversion: V1.1.1/55 * @Revision 9 - [02/11/2015] Francis De Paemeleere * - adjust .channels.xml generation * uses cleanup(tags) * @Revision 8 - [24/04/2013] Jan van Straaten * removed the remaining tags in title * @Revision 7 - [30/05/2012] Jan van Straaten * title in html changed again * @Revision 6 - [] * title and alternative title swapped * @Revision 5 - [] * alternative title * @Revision 4 - [] * improved index_showsplit * @Revision 3 - [] * Full detail version * @Remarks: * possibly incomplete rating and video elements (see lookup 'list' in modify section) * this site is very very slow in La Gomera * @header_end **------------------------------------------------------------------------------------------------ site {url=telerama.fr|timezone=Europe/Paris|maxdays=15|cultureinfo=fr-FR|charset=windows-1252|titlematchfactor=90} site {episodesystem=onscreen|subtitlestype=deaf-signed} site {retry=6} url_index{url|http://television.telerama.fr/tele/chaine-tv/,|channel|.php?&date=|urldate} urldate.format {datestring|yyyy-MM-dd} * index_showsplit.scrub {multi|
||} index_urlshow {url|http://television.telerama.fr/tele||href="/tele|" onclick|} index_start.scrub {single|
|de | à |
} index_stop.scrub {single|
| à |
|
} index_title.scrub {single|

|');">|} index_start.modify {replace|h|:} index_stop.modify {replace|h|:} index_temp_1.scrub {multi(separator="
")|

|||

} index_description.modify {substring(type=element)|'index_temp_1' -1 1} index_description.modify {cleanup(tags="<"">")} index_temp_1.modify {remove(type=element)|-1 1} * remove the description part index_temp_1.modify {substring(type=element)|0 1} * get the first part only index_temp_1.modify {replace|
|\|} * split the first part into subtitle and the rest index_temp_2.modify {calculate(type=element format=F0)|'index_temp_1' #} * count the number of elements now in index_temp_1 index_subtitle.modify {substring('index_temp_2'>"1" type=element)|'index_temp_1' 0 1} * get the first element (this is the subtitle) index_subtitle.modify {cleanup(tags="<"">")} index_category.scrub {single|

||

|

} index_actor.scrub {multi|Acteur :|.php">||
} index_actor.modify {replace|,|\|} index_presenter.scrub {multi|Présentateur :|.php">||
} index_director.scrub {multi|Réalisateur :|.php">||
} index_writer.scrub {multi|Scénariste :|.php">||
} index_episode.scrub {single|
|Fiche épisode ||
} * *title.scrub {single(exclude="||

|
} * revision 6 version title.scrub {single(exclude="||

||">||} * alternative title description.scrub {single|Synopsis|

|

|
} description.scrub {single|SYNOPSIS|

|

| } category.scrub {single(separator=" "" " include=first)|Genre : ||
|
} productiondate.scrub {multi(separator=" "" " exclude="||

|

} * scrubs things like subtitles, video and rating in an array: temp_1.scrub {multi||alt="|" />|} * title.modify {addstart("")|'temp_2'} * use alternative title when empty title.modify {cleanup(tags="<"">")} * * prevent the links to showdetails for certain categories: index_urlshow.modify {remove('index_category' "magazine")|'index_urlshow'} index_urlshow.modify {remove('index_category' "variétés")|'index_urlshow'} index_urlshow.modify {remove('index_category' "journal")|'index_urlshow'} index_urlshow.modify {remove('index_category' "")|'index_urlshow'} * * lookup list to construct video, subtitles and rating from temp_1 videoquality.modify {addstart('temp_1' ~ "HD")|HDTV} * other values? videoaspect.modify {addstart('temp_1' ~ "169")|16:9} * other values? subtitles.modify {addstart('temp_1' ~ "Malentendant")|true} rating.modify {addstart('temp_1' ~ "-TP")|TP} * other values? rating.modify {addstart('temp_1' ~ "-12\"")|12} * other values? rating.modify {addstart('temp_1' ~ "-10\"")|10} * other values? rating.modify {addstart('temp_1' ~ "-16\"")|16} * other values? ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *url_index{url|http://television.telerama.fr/tele/grille.php} *index_site_id.scrub {regex||^.*?]*>\s*(]*value=\".*?\"[^>]*>.*?\s*)*||} *scope.range {(channellist)|end} *index_site_channel.modify {addstart|'index_site_id'} *index_site_channel.modify {substring(type=regex)|]*value=\".+?\"[^>]*>\s*(.+?)\s*} *index_site_channel.modify {replace(type=regex)|\s{1,}| } *index_site_id.modify {substring(type=regex)|]*value=\"(.+?)\"[^>]*>.+?} *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} *end_scope ** @auto_xml_channel_end