**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: tv.com
* @MinSWversion: V1.57
* @Revision 6 - [19/10/2017] Blackbear199
* - added required header
* @Revision 5 - [16/12/2016] Blackbear199
* - added subdetail pages
* @Revision 4 - [24/07/2016] Blackbear199
* - added retry=
* @Revision 3 - [03/06/2016] Blackbear199
* - fix - sometimes title not present on showdetails page
* @Revision 2 - [12/01/2016] Francis De Paemeleere
* - get all the data available (previous only 3 or 4 days were grabbed)
* @Revision 1 - [05/01/2016] Jan van Straaten
* - remove some special chars in the title (only seen on movies)
* @Revision 0 - [03/11/2015] Jan van Straaten
* - creation
* @Remarks: directv alternative, less details
* @header_end
**------------------------------------------------------------------------------------------------
site {url=tv.com|timezone=America/New_York|maxdays=10|cultureinfo=en-US|charset=UTF-8|titlematchfactor=90|nopageoverlaps}
site {ratingsystem=US|episodesystem=onscreen}
site {loadcookie=tv.com.cookies.txt|retry=4}
*
url_index{url|http://www.tv.com/listings/singlestation/?start=##TIMESTAMP##&last_event=nada&station=|channel|}
url_index.headers {customheader=X-Requested-With=XMLHttpRequest}
url_index.headers {customheader=Accept-Encoding=gzip,deflate}
*
urldate.format {datestring|yyyy-MM-dd}
*
scope.range {(urlindex)|end}
index_variable_element.modify {calculate(format=date,unix)|'urldate'}
url_index.modify {replace|##TIMESTAMP##|'index_variable_element'}
end_scope
*
index_showsplit.scrub {regex||
|}
subdetail_writer.modify {cleanup(tags="<"">")}
*
*episode Sx Ex can be used for episode system=onscreen or xmltv_ns
subdetail_temp_3.scrub {single|class="ep_season" itemprop="partOfSeason">|||}
subdetail_temp_4.scrub {single||||}
subdetail_temp_4.modify {cleanup(tags="<"">")}
subdetail_temp_4.modify {addstart('subdetail_temp_3' not "")|'subdetail_temp_3' }
subdetail_episode.modify {addstart('subdetail_temp_4' not "" pattern="Season 'S1' Episode 'E1'")|'subdetail_temp_4'}
*
*episode S0xE0x for kodi,ect which require leading zero when single digit.use episodesystem=onscreen only
*subdetail_temp_3.scrub {single|class="ep_season" itemprop="partOfSeason">|||}
*subdetail_temp_3.modify {remove(not "")|Season }
*subdetail_temp_5.modify {calculate('subdetail_temp_3' not "" format=F0 type=char)|'subdetail_temp_3' #}
*subdetail_temp_3.modify {addstart('subdetail_temp_5' < "2")|0}
*subdetail_temp_3.modify {clear("0")}
*subdetail_temp_3.modify {addstart(not "")|S}
*subdetail_episode.scrub {single||||