**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: cosmote.gr * @MinSWversion: 1.57 * @Revision 1 - [13/08/2016] ankont * @Revision 0 - [06/06/2016] Blackbear199 * - creation * @Remarks: * @header_end **------------------------------------------------------------------------------------------------ site {url=cosmote.gr|timezone=Europe/Athens|maxdays=8|cultureinfo=el-GR|charset=UTF-8|titlematchfactor=90} site {ratingsystem=GR|episodesystem=xmltv_ns} url_index{url|https://www.cosmote.gr/portal/residential/program/epg/programchannel?p_p_id=channelprogram_WAR_OTETVportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-5&p_p_col_count=1&_channelprogram_WAR_OTETVportlet_platform=DTH&_channelprogram_WAR_OTETVportlet_dateModifier=-1&_channelprogram_WAR_OTETVportlet_service=EPG&_channelprogram_WAR_OTETVportlet_date=##date##&_channelprogram_WAR_OTETVportlet_articleTitleUrl=|channel|} url_index.headers {customheader=Accept-Encoding=gzip,deflate} urldate.format {datestring|dd-MM-yyyy} * scope.range{(urlindex)|end} index_variable_element.modify {calculate(format=date,dd-MM-yyyy)|'urldate' 01:00:0000 +} url_index.modify {replace|##date##|'index_variable_element'} end_scope * index_showsplit.scrub {multi|||} index_showsplit.modify {cleanup(removeduplicates=equal,100)} index_urlchannellogo {url|https://www.cosmote.gr||} * scope.range{(indexshowdetails)|end} index_start.scrub {single||||} index_stop.scrub {single||||} index_urlshow {url||} index_title.scrub {single|||} index_titleoriginal.modify {substring(type=regex)|'index_title' "\s\((.+)\)"} index_title.modify {remove('index_titleoriginal' not "")| ('index_titleoriginal')} index_category.scrub {single||||} *index_temp_1 is actually index_episode index_temp_1.modify {substring(type=regex)|'index_title' "\s[ΕE](\d+)"} index_title.modify {remove('index_temp_1' not "" type=regex)|\s[ΕE]'index_temp_1'} index_temp_2.modify {substring(type=regex)|'index_title' "\s[ΚK](\d+)"} index_title.modify {remove('index_temp_2' not "" type=regex)|\s[ΚK]'index_temp_2'} index_temp_1.modify {addstart|'index_temp_2'.} index_category.modify {addend('index_titleoriginal' "Z")|\|Live} index_titleoriginal.modify {remove("Z")|'index_titleoriginal'} index_category.modify {addend('index_titleoriginal' "Ζ")|\|Live} index_titleoriginal.modify {remove("Ζ")|'index_titleoriginal'} index_previousshown.modify {addend('index_titleoriginal' "E")|true} index_titleoriginal.modify {remove("E")|'index_titleoriginal'} index_previousshown.modify {addend('index_titleoriginal' "Ε")|true} index_titleoriginal.modify {remove("Ε")|'index_titleoriginal'} index_category.modify {addend('index_titleoriginal' "Μ")|\|Μαγνητοσκοπημένο} index_titleoriginal.modify {remove("Μ")|'index_titleoriginal'} index_category.modify {addend('index_titleoriginal' "M")|\|Μαγνητοσκοπημένο} index_titleoriginal.modify {remove("M")|'index_titleoriginal'} end_scope scope.range{(showdetails)|end} title.modify {set|'index_title'} productiondate.scrub{single|
|Έτος παραγωγής: |.|
} productiondate.scrub{single|
|(|)|
} productiondate.scrub {multi(include="παραγωγής")|

|. ||

} showicon.scrub {single|photo_name} showicon.modify {clear("/portal/OTETV-portlet/images/noimage.png")} showicon.modify {addstart(not "")|https://www.cosmote.gr} subtitle.scrub {single|
|Επεισόδιο: |. |
} subtitle.scrub {single(type=regex)||

(?:\s*)\'(.*?)\'\. (?:.*?)

||} commentator.scrub {single|
|Περιγραφή: |. |
} description.scrub {multi|
|

|

|
} description.modify {remove|Επεισόδιο: 'subtitle'. } description.modify {remove|\''subtitle'\'. } description.modify {remove|Περιγραφή: 'commentator'. } temp_1.modify {substring(type=regex)|'description' "(.*?)[\.] "} temp_1.modify {select|"παραγωγής" ~} description.modify {remove('temp_1' not "")|'temp_1'. } description.modify {addend| 'temp_1'} director.scrub {multi|
||
} actor.scrub {multi(separator=",")|
||
} description.modify {addstart| } description.modify {remove| ('productiondate').} description.modify {remove|Έτος παραγωγής: 'productiondate'.} description.modify {cleanup} category.modify {addend('title' ~ "ντοκιμαντέρ")|\|Ντοκυμαντέρ} category.modify {addend('description' ~ "παιδική σειρά")|\|Παιδικά} category.modify {addend('description' ~ "ενημερωτική εκπομπή")|\|Ενημ. εκπομπή} temp_5.modify {substring(type=regex)|'description' "\((\d+)\'\)"} temp_5.modify {calculate(format=F0)} description.modify {replace|('temp_5'\')|(Διάρκεια: 'temp_5'\')} temp_5.modify {set('config_display_name' "ΟΤΕ History")|"0"} category.modify {addend('temp_5' not "0")|\|Ταινία} rating.scrub {single|} rating.modify {replace|G|all} rating.modify {replace|PG|pga} rating.modify {replace|PG-13|pgc} rating.modify {replace|R|pg15} rating.modify {replace|NC-17|x} episode.modify {set|'index_temp_1'} episode.modify {addend|^} * Use subdetail_temporary character ^ *add part number for the episode (if exists) temp_4.modify {clear} subtitle.modify {cleanup} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Μέρος\sΑ\'?\)?"|^^^P1} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Α\'?\s[Μμ]έρος\)?"|^^^P1} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Μέρος\sΒ\'?\)?"|^^^P2} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Β\'?\s[Μμ]έρος\)?"|^^^P2} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Μέρος\sΓ\'?\)?"|^^^P3} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Γ\'?\s[Μμ]έρος\)?"|^^^P3} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Μέρος\sΔ\'?\)?"|^^^P4} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Δ\'?\s[Μμ]έρος\)?"|^^^P4} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Μέρος\sΕ\'?\)?"|^^^P5} subtitle.modify {replace(type=regex)|"[\s-,]\s?\(?Ε\'?\s[Μμ]έρος\)?"|^^^P5} temp_2.modify {calculate(type=char format=F0|'subtitle' "^^^P" -@} temp_2.modify {calculate(not "-1" format=F0)|4 +} temp_4.modify {substring('temp_2' not "-1" type=char)|'subtitle' 'temp_2' 1} temp_4.modify {calculate(format=F0)} episode.modify {addend('temp_4' not "0")|'temp_4'} subtitle.modify {remove|^^^P'temp_4'} *add original title and episode numbers to description temp_1.modify {set|\" - Επ. 'episode']} episode.modify {replace|^|.} * Restore period character for part number temp_1.modify {replace|Επ. .|Επ. } * Fix no season number temp_1.modify {replace|.^|ου κύκλου^} * Add unknown episode number for season temp_1.modify {replace|^| / Μέρος } * Fix part number character temp_1.modify {replace|Επ. /|/} * Fix no episode number (a) temp_1.modify {replace| / Μέρος ]|]} * Fix no part number temp_1.modify {replace|- /|-} * Fix no episode number (b) temp_1.modify {addstart|'index_titleoriginal'} * Add original title temp_1.modify {addstart|[\"} temp_1.modify {replace| -]|]} * Remove empty episode-num temp_1.modify {replace|[\"\" - |[} * Remove empty title description.modify {addstart('temp_1' not "[\"\"]")|'temp_1' } description.modify {replace|] . |] } *fix numbers according to xmltv_ns temp_1.modify {set|'episode'} episode.modify {clear} loop {('temp_1' not "" max=5)|end} temp_2.modify {calculate(type=char format=F0)|'temp_1' "." @} temp_2.modify {replace("-1")|-1|500} temp_3.modify {substring(type=char)|'temp_1' 0 'temp_2'} temp_2.modify {calculate(format=F0)|1 +} temp_1.modify {substring(type=char)|'temp_1' 'temp_2'} temp_3.modify {calculate(> "0" format=F0)|1 -} episode.modify {addend('temp_3' not "")|'temp_3'.} episode.modify {addend('temp_3' "")|.} end_loop episode.modify {addend('temp_4' not "0")|^^^} episode.modify {remove('temp_4' not "0")|.^^^} episode.modify {remove("..")|..} episode.modify {remove(".")|.} description.modify {addend|^^^} description.modify {remove|. (ΤΠ)^^^} description.modify {remove|. ^^^} description.modify {remove|.^^^} description.modify {remove|^^^} end_scope * ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *url_index{url|https://www.cosmote.gr/portal/residential/program?p_p_id=dayprogram_WAR_OTETVportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-4&p_p_col_count=1&_dayprogram_WAR_OTETVportlet_platform=IPTV&_dayprogram_WAR_OTETVportlet_start=0&_dayprogram_WAR_OTETVportlet_feedType=EPG&_dayprogram_WAR_OTETVportlet_date='urldate'&_dayprogram_WAR_OTETVportlet_end=15} *index_site_id.scrub {multi|">Κανάλια|portlet_articleTitleUrl%3D|%26_channelprogram|} *index_site_channel.scrub {multi|">Κανάλια|">||} *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} ** @auto_xml_channel_end