**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: freeview.com.au
* @MinSWversion: 1.1.1/54
* @Revision 0 - [11/09/2016] i286
* - EPG scraper to suit NEW Freeview site from late October 2016
* @Remarks: Get channel list from http://freeviewcdn.azureedge.net/XML/config.xlsx
* @Remarks: Insert an additional column before column F
* @Remarks: In the new column, row 2 paste without square brackets [=SUBSTITUTE(SUBSTITUTE(A2,"0x",""),".","")] and expand down to end of spreadsheet data
* @Remarks: Then on 'Services' tab, filter column 'Region' and your site_id is the numbers from the column we created
* @Remarks: Example 'WebGrab++.config.xml' line 'ABC ME'
* @Remarks: Set 8 in 'WebGrab++.config.xml' as there is up to 9 days of EPG data available, when Freeview updates the listing
* @Remarks: Timezone needs to remain in UTC as that is how Freeview now provides the dates, do not change!
* @header_end
**------------------------------------------------------------------------------------------------
site {cultureinfo=en-AU|timezone=UTC|maxdays=9.1|charset=utf-8|titlematchfactor=90|episodesystem=xmltv_ns|ratingsystem=AU}
url_index {url()|http://freeviewcdn.azureedge.net/XML/new_XML/listings_|channel|.xml}
index_showsplit.scrub {regex()||(?:)||} *split URL into individual episodes
*
index_start.scrub {regex(pattern="yyyy-MM-dd'T'HH:mm:ss'Z'")||||} *episode start time
index_duration.scrub {regex()||||} *episode length
index_title.scrub {regex()||(.*?)(?:.*?))*||} *show name
index_subtitle.scrub {regex()||(.*?)(?:.*?))*||} *episode name
index_description.scrub {regex()||(?:(.*?)(?:.*?))*(.*?))||} *actors
index_rating.scrub {regex()||(?:classification="\((.*?)\)")||} *parental guide rating
index_category.scrub {regex()||(?:genre="(.*?)")||} *genre
index_category.scrub {regex()||(?:subgenre="(.*?)")||} *subgenre
index_productiondate.modify {substring(type=regex)|'index_description' "\ \((\w+)\)$"} *production year
index_description.modify {remove(type=regex)|"(\ \(\w+\)$)"} *remove production year from title
*
*xmltv_ns episode format
index_temp_1.scrub {regex()||||} *season number
index_temp_1.modify {calculate(not "" format=F0)|1 -}
index_temp_1.modify {set('index_temp_1' "")|-1}
index_temp_1.modify {addend|.}
index_episode.scrub {regex()||||} *episode number
index_episode.modify {calculate(not "" format=F0)|1 -}
index_episode.modify {addend('index_episode' not "")|.}
index_episode.modify {addstart('index_episode' not "")|'index_temp_1'} *xmltv_ns episode format