**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: nos.pt * @MinSWversion: V2.1 * @Revision 5 - [09/04/2019] doglover * title & episode fix, channels file creation fix * @Revision 4 - [25/09/2016] Blackbear199 * index_urlshow fix * @Revision 3 - [25/05/2016] Blackbear199 * add cleanup for title/subtitle for encoded characters * @Revision 2 - [20/01/2016] Francis De Paemeleere * fix grabbing the show detail id * @Revision 1 - [28/07/2014] Jan van Straaten * titlematchfactor adjusted t 50 (abreviated titles in index) * @Revision 0 - [28/07/2014] Jan van Straaten * creation * @Remarks: * replaces zon.pt * @header_end **------------------------------------------------------------------------------------------------ site {url=nos.pt|timezone=Europe/Lisbon|maxdays=7.1|cultureinfo=pt-PT|charset=UTF-8|titlematchfactor=50|firstshow=1} site {episodesystem=xmltv_ns} * url_index{url|http://www.nos.pt/particulares/televisao/guia-tv/Pages/channel.aspx?channel=|channel} url_index.headers {customheader=Accept-Encoding=gzip,deflate} * index_variable_element.scrub {single(scope=datelogo)|} * index_showsplit.scrub {multi(include="")|
|} * scope.range {(splitindex)|end} index_showsplit.modify {cleanup(removeduplicates=equal span=2)} index_showsplit.modify {remove| } end_scope * scope.range {(indexshowdetails)|end} index_start.scrub {single(separator="-" include=first)||||} index_stop.scrub {single(separator="-" include=last)||||} index_title.scrub {single()|title='||'|<} index_category.scrub {single|class='||' id|} index_episode.modify {substring(type=regex)|'index_title' "T\.\d+\sEp\.\d+"} index_title.modify {remove('index_episode' not "")|'index_episode'} index_episode.modify {remove(not "")|.} index_episode.modify {replace(not "")|T|S} index_episode.modify {replace(not "")|Ep|E} index_episode.modify {remove | } * index_temp_1.scrub {regex||id='(\d*)'||} * the showid index_temp_1.modify {set|\'programId\':'index_temp_1',\'channelAcronym\':\''index_variable_element'\',\'hour\':\'0\',\'startHour\':\''index_start'\',\'endHour\':\''index_stop'\'} * index_urlshow.modify {addstart('index_temp_1' not= "")|http://www.nos.pt/_layouts/15/Armstrong/ApplicationPages/EPGGetProgramsAndDetails.aspx/GetProgramDetails} index_urlshow.headers {method=POST} index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} index_urlshow.headers {accept=application/json, text/javascript, */*; q=0.01} index_urlshow.headers {contenttype=application/json; charset=utf-8} index_urlshow.headers {customheader=X-Requested-With=XMLHttpRequest} index_urlshow.headers {referer=http://www.nos.pt/particulares/televisao/guia-tv/Pages/channel.aspx?channel='config_site_id'} index_urlshow.headers {host=www.nos.pt} index_urlshow.headers {postdata={'index_temp_1'}} end_scope * scope.range {(showdetails)|end} title.modify {addstart|'index_title'} description.scrub {single|$_||_#|_#} description.modify {cleanup(style=jsondecode)} title.modify {cleanup} subtitle.modify {remove|-} subtitle.modify {cleanup} end_scope ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start *url_index {url|http://www.nos.pt/particulares/televisao/guia-tv/Pages/default.aspx} *index_site_channel.scrub {multi|} *index_site_id.scrub{multi|} ** @auto_xml_channel_end