**------------------------------------------------------------------------------------------------ * @header_start * WebGrab+Plus ini for grabbing EPG data from TvGuide websites * @Site: osn.com * @MinSWversion: V3.0 * @Revision 11 - [15/05/2020] WGT * @Revision 10 - [07/04/2020] WGT fix start * @Revision 9 - [16/12/2018] Fazzani * Fixing incorrect EndDateTime * @Revision 8 - [15/12/2018] Fazzani * fixing .ini generator blok * @Revision 7 - [07/10/2016] Jan van Straaten * rewrite * @Revision 6 - [06/10/2015] Jan van Straaten * completely new , osn.com * @Revision 5 - [31/1/2014] Jan van Straaten * in rev 4 the channel creation was still enabled! * @Revision 4 - [15/1/2014] Jan van Straaten * complete new * @Revision 3 - [7/2/2012] Jan van Straaten * site changes in url, cast * @Revision 2 - [] * adapted for 1.0.9 * @Revision 1 - [] * corrected for end of the day gabs * @Remarks: * Previously osnnetwork which doesn't exist any more. * @header_end **------------------------------------------------------------------------------------------------ site {url=osn.com|timezone=UTC|maxdays=7|cultureinfo=en-US|charset=utf-8|titlematchfactor=90|episodesystem=onscreen} url_index {url|http://www.osn.com/CMSPages/TVScheduleWebService.asmx/GetTVChannelsProgramTimeTable} url_index.headers {customheader=Accept-Encoding=gzip,deflate} url_index.headers {method=POST} url_index.headers {accept=application/json, text/javascript, */*; q=0.01} url_index.headers {contenttype=application/json; charset=utf-8} url_index.headers {postdata={"newDate":"'urldate'","selectedCountry":"SA","channelCode":"'channel'","isMobile":false,"hoursForMobile":18}} urldate.format {datestring|MM/dd/yyyy} index_variable_element.modify {set|'config_site_id'} index_urlchannellogo.modify {addstart|http://content.osn.com/logo/channel/cropped/'index_variable_element'.png} index_showsplit.scrub {multi|[|{|}|]} scope.range{(indexshowdetails)|end} index_start.scrub {single|\"StartDateTime\":\"\\/Date(||)\\/\"|)\\/\"} index_start.modify {calculate(format=date,java)|0:1:0 +} *index_stop.scrub {single|\"EndDateTime\":\"\\/Date(||)\\/\"|)\\/\"} index_title.scrub {single|\"Title\":\"||\"|\"} index_titleoriginal.scrub {single(lang=ar)|\"Arab_Title\":\"||\"|\"} index_title.modify {cleanup(style=jsondecode)} index_title.modify {remove|\} index_category.scrub {regex||\\"Genre[^N]*Name\\":\\"([^\\]*)\\"||} index_temp_1.scrub {single|\"EPGUNIQID\":\"||\"|\"} index_urlshow.modify {addstart('index_temp_1' not "")|http://www.osn.com/CMSPages/TVScheduleWebService.asmx/GetProgramDetails} index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} index_urlshow.headers {method=POST} index_urlshow.headers {accept=application/json, text/javascript, */*; q=0.01} index_urlshow.headers {contenttype=application/json; charset=utf-8} index_urlshow.headers {postdata={"prgmEPGUNIQID":"'index_temp_1'","countryCode":"SA"}} end_scope scope.range{(showdetails)|end} title.scrub {regex||\\"Title\\":\\"(.*?)\\",||} title.modify {cleanup(style=jsondecode)} title.modify {remove|\} description.scrub {regex||\\"Synopsis\\":\\"(.*?)\\",||} description.scrub {regex||\\"Arab_Synopsis\\":\\"(.*?)\\",||} description.modify {cleanup(style=jsondecode)} description.modify {remove|\} showicon.scrub {regex||\\"ProgramImage\\":\\"(.*?)\\",||} showicon.modify {addstart|http://content.osn.com/bob/745x419/} episode.scrub {regex(pattern="'E1'")||\\"EpisodeNo\\":\\"(.*?)\\",||} episode.modify {clear("0")} end_scope ** ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file) ** ** @auto_xml_channel_start url_index{url(debug)|http://www.osn.com/CMSPages/TVScheduleWebService.asmx/GetTVChannelsPageWise} * url_index.headers {method=POST} url_index.headers {contenttype=application/json; charset=utf-8} url_index.headers {postdata={"pageIndex":'subpage',"channelsQuery": "select distinct ROW_NUMBER() OVER(ORDER BY CH.Number) AS RowNumber,CH.Number, CH.Name, CH.ChannelGenre, ch.ChannelCode, CH.HD, ch.OSNPlay,CH.OSNPlayURL INTO #Results FROM osn_Channel CH Where CH.IsActive=1 AND CH.Number <> 0 And (1=1) And (1=1) And (1=1) And (1=1) And (1=1)"}} index_site_id.scrub {multi(debug)|\"ChannelCode\":\"||\"|\"} index_site_channel.scrub {multi|\"Name\":\"||\"|\"} index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")} ** @auto_xml_channel_end