**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: plus.es * @MinSWversion: V1.1.1/5405 * @Revision 1 - [23/07/2014] Jan van Straaten * - fixed start time errors and added episode, rating and productiondate * @Revision 0 - [16/07/2014] Francis De Paemeleere/ Jan van Straaten * - creation * @Remarks: * @header_end **------------------------------------------------------------------------------------------------ * site {url=plus.es|timezone=UTC+01:00|maxdays=28|cultureinfo=es-ES|charset=iso-8859-15,UTF-8|titlematchfactor=50|subtitlestype=onscreen|ratingsystem=MPAA|episodesystem=xmltv_ns|} * url_index{url()|http://www1.plus.es/modulo/index.html?params=fecha%3D|urldate|%26hora%3D|subpage|%26cadenas%3D|channel|%26vista%3Dampliada%26modulo%3DGUIParrilla} *http://www.plus.es/modulo/index.html?params=fecha%3D17072014%26hora%3D2000%26cadenas%3DTVE%26vista%3Dampliada%26modulo%3DGUIParrilla urldate.format {datestring|ddMMyyyy} subpage.format {list|0100|0400|0700|1000|1300|1600|1900|2200} * scope.range {(splitindex)|end} index_showsplit.scrub {multi||||} * copy index pages index_showsplit.modify {remove|\n} index_showsplit.modify {remove| } * insert a dummy at each subpage start index_showsplit.modify {replace(type=regex)|"(
.+?
)"|
subpage start , remove
} * split into index_showsplit index_showsplit.modify {substring(type=regex)|"
)"} * *index_showsplit.modify {addstart|} * for inspection only * the following loop replaces the showdata of the first show after a subpage if it is the same show as the last show of the previous subpage, * but the time_ component is kept because it is needed in the next loop as duration index_temp_1.modify {calculate(format=F0 type=element)|'index_showsplit' #} * the loop counter loop {('index_temp_1' > "1" max=200)|end} index_temp_2.modify {clear} * will contain the showid of the show after the subpage index_temp_3.modify {clear} * will contain the data of the show before the subpage index_temp_1.modify {calculate(format=F0)|1 -} * next index index_temp_5.modify {calculate(format=F0)|0 *} *reset the condition 0 not on a subpage +1 on a subpage 2 the show before and after the subpage contain the same show index_temp_6.modify {substring(type=element)|'index_showsplit' 'index_temp_1' 1} * the index_showsplit index_temp_5.modify {calculate('index_temp_6' ~ "subpage" format=F0)|1 +} * we are on a subpage, examine the show before and after index_temp_1.modify {calculate('index_temp_5' = "1" format=F0)|1 +} * the index of the show after the subpage index_temp_6.modify {substring('index_temp_5' = "1" type=element)|'index_showsplit' 'index_temp_1' 1} * the show after the subpage index_temp_6.modify {addend('index_temp_5' = "1")|} * to identify it for the next loop index_showsplit.modify {replace('index_temp_5' = "1" type=element)|'index_showsplit' 'index_temp_1' 1|'index_temp_6'} index_temp_2.modify {substring('index_temp_5' = "1" type=regex)|'index_temp_6' "()"} * the data excl the time_ component of the show before the subpage index_temp_5.modify {calculate('index_temp_3' ~ 'index_temp_2' format=F0)|1 +} * condition "2" ,same show before and after the subpage index_showsplit.modify {replace('index_temp_5' = "2" type=element)|'index_showsplit' 'index_temp_1' 1|removed} * indicate the show before the subpage as removeduplicates index_temp_6.modify {replace('index_temp_5' = "2" type=regex)|"\">()"|'index_temp_3'} * replace the data of the show after the subpage with that of before that, keep the time_ value index_temp_1.modify {calculate('index_temp_5' = "2" format=F0)|2 +} * back to the show after the subpage index_showsplit.modify {replace('index_temp_5' = "2" type=element)|'index_showsplit' 'index_temp_1' 1|'index_temp_6'} *index_temp_1.modify {calculate('index_temp_5' = "2" format=F0)|3 -} * jump over the show before the subpage index_temp_1.modify {calculate('index_temp_5' = "2" format=F0)|2 -} * jump over the show before the subpage end_loop * *remove the first index_show (that's a subpage) index_showsplit.modify {remove(type=element)|0 1} * * the next loop calculates the start and stop times from the 'duration' which is the value of time_nn at the beginning of each indexshow * the first 'duration value of each subpage is counted from the subpage starttime : * The first start time is always(?) 38 minutes before the first subpage time , here 01:00 - 00:38 = 00:22 index_variable_element.modify {clear} index_variable_element.modify {addstart|00:22} * the 'base' startime of the first subpage index_temp_1.modify {clear} index_temp_1.modify {addstart|00:22} * the first start time * index_temp_3.modify {calculate(format=F0)|0 *} *subpage counter 0, 3, 6 etc index_temp_5.modify {clear} * will contain the new buildup of the index_showsplit * loop {(each 'index_temp_6' in 'index_showsplit')|end} index_temp_2.modify {calculate(format=F0)|0 *} * will contain the duration of the show * calculate the 'base' starttime at each subpage index_temp_3.modify {calculate('index_temp_6' ~ "subpage" format=F0)|3 +} * increase subpage counter if on subpage *index_temp_1.modify {addstart|} index_variable_element.modify {calculate('index_temp_6' ~ "subpage" format=time,HH:mm)|'index_temp_3' 00:22 +} * the new 'base' startime * add the start time of this show * calculate the starttime index_temp_4.modify {clear} * will contain the new show info index_temp_4.modify {addend('index_temp_6' not ~ "remove")|'index_temp_6'} index_temp_4.modify {addend|} index_temp_4.modify {addend|'index_temp_1'} index_temp_4.modify {addend|} * get the duration of this show index_temp_2.modify {substring('index_temp_6' not ~ "remove" type=regex)|'index_temp_6' "\Atime_(\d+)"} * calculate the stop time of this show index_temp_2.modify {calculate(format=time)|60 /} * converted into hh:mm index_temp_1.modify {calculate('index_temp_6' not ~ "" format=time)|'index_temp_1' 'index_temp_2' +} index_temp_1.modify {calculate('index_temp_6' ~ "" format=time)|'index_variable_element' 'index_temp_2' +} * index_temp_4.modify{addend|} index_temp_4.modify{addend|'index_temp_1'} index_temp_4.modify{addend|} * index_temp_5.modify{addend('index_temp_4' ~ "||} *index_start.modify {addstart|'previous_stop'} index_stop.scrub {single|||} *index_subtitle.scrub {regex||(.*?)||} * optional starttime check *index_subtitle.modify {cleanup} index_title.scrub {single()||||} index_category.scrub {single||||} * index_urlshow {url|http://www.plus.es||">} index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the detail pages * title.scrub {single|
|>|<|} subtitle.scrub {single(separator=": " include=last exclude="Episodio")|

|

|
} description.scrub {multi|
|

|
} episode.scrub {single|
| TEMPORADA |

|} temp_1.scrub {single|

|Episodio |

|
} titleoriginal.scrub {single(lang=en)|

||

|
} *temp_2.scrub {single|
Título Original Serie:
|
|
|} productiondate.scrub {single|
  • } composer.scrub {multi|

    COMPOSITOR

    |||

    } actor.scrub {multi|

    |||

    } director.scrub {multi|

    |||

    } writer.scrub {multi|} *presenter.scrub {single(separator=", ")|
    PRESENTADOR:
    |
    |
    |} producer.scrub {multi|

    PRODUCTOR

    |||

    } rating.scrub {single|

    Calificación

    |alt="|">|
  • } subtitles.scrub {single|Subtítulos:|(|)|

    } *premiere.scrub {single|
    Tipo de pase:
    |Estr|} *previousshown.scrub {single|
    Tipo de pase:
    |Multidifusió|} showicon.scrub {url||
    ||</div>}
*
temp_1.modify {remove|: 'subtitle'}
title.modify {remove|. TEMPORADA 'episode'}
titleoriginal.modify {remove|. TEMPORADA 'episode'}
description.modify {addstart('temp_1' not ">} subtitles.modify {replace(not "")|'subtitles'|true} *premiere.modify {replace(not "")|'premiere'|true} *previousshown.modify {replace(not "")|'previousshown'|true} rating.modify {replace|No recomendada para menores de doce años|PG} rating.modify {replace|No recomendada para menores de siete años|TV-Y7} rating.modify {replace|No recomendada para menores de trece años|TV-14} rating.modify {replace|No recomendada para menores de dieciocho años|TV-MA} rating.modify {replace|Apta para todos los públicos|TV-G} rating.modify {replace|No recomendada para menores de dieciséis años|TV-14}