You are here

Site.channels.xml

Usage

For nearly every site, there is a site.channels.xml file available.

This file is not used by WG++ itself, but has to be used to configure the channels you want to grab, in the WebGrab++.config.xml file.

It contains all the channels that can be grabbed for a specific site. So if you want to grab a TV channel, look for that channel line in the site.channels.xml and copy it to the WebGrab++.config.xml file. Example: channel_line

Single channel list

Sometime you want to generate your own .channels.xml file (because the one on the site is out of date, or you have a special siteini file, ...)

Here again, most siteini files support this, but not all. For the one that do not support this, the forum is your bet. There are always people who want to help you out.

The overall overview, to do this:

1. As of WG++ version 2.1.7 you can just run update_c This will work for site.ini with one block for channel generation and create channel list without modification to the site.ini file, ence a channel list for all siteini listed in your config will be produced. New channel list will be in your WG++ directory, please use them to update/change channels lines in the config. Viceversa "the old method" (see Old Method below) is created by enabling .channels.xml generation in the siteini file
2. Add 1 dummy channel in to the WebGrab++.config.xml file + only configure to grab 1 day, example: Line sample
3. run WG++ once (this wil generate the your_site.channels.xml file)
4. Change the update "c" in config to "f" or "i" to grab epg again, output is always WG++ directory

XMLTV_ID prefix

Some users reported the problem of the same channel name (xmltv_id) in configuration causing a duplicate error, a classic example is "Sky Cinema" being present in different countries and siteinis. From version 4.2.4.4 it has been introduced in "site" line the element: channelnameprefix=xxxx (xxxx=text) to allow a prefix to be added to xmltv_id, example adding to site line of tvdigital.de.ini the element channelnameprefix=DE the result in creating a channel list will be:

 <channel update="i" site="tvdigital.de" site_id="603" xmltv_id="DE Sky Crime">Sky Crime></channel>

Please note that it affect only xmltv_id, while the channel name remain the same.

Multi Channel list

1. With the need to get from complex sites, specific data required like provider, region or bouquets, before the final channel list, with version wg++ 3.1.7.1 or above it has been introduced the possibility to run within the same site.ini a multi channel list, aka channel blocks, using update mode c1, c2, c3 and so on. Example: for a site that use region and channels, you can get region with:

 <update>c1</update>

2. Run WG++ once, this wil generate a list (in this example, regions)  named  siteini.channels.c1.xml

3. Use a c1 line (from the c1 list) to produce the next channel list using:

<update>c2</update>

4. Run WG++ once, this wil generate a siteini.channels.c2.xml (in this example, channels), that will be our final channel list.

5. Add generated channels to your config, set update mode other then "c" and run wg++ to get your epg guide.xml.

Steps required for each siteini will be indicated in site.ini header by the site.ini maker.

Old Method (except update "c"):

Old site.ini may need the old method  to produce a channel list, below is an example for site named mysite.com that require the below steps.

1. Open mysite.com.ini with a plain text editor (Notepad, Notepad++, vi, emacs, TextEdit, ...).
Look for the .channels.xml generation lines and uncomment them. This is done by removing the first * in front of each line.
The lines can be found like follows:

new way
Look for @auto_xml_channel_start & @auto_xml_channel_end and uncomment everyting inbetween those two elements.
eg. change:

** @auto_xml_channel_start
** example of one entry <option value="89">101 M-Net</option>
*scope.range {(channellist)|end}
*index_site_channel.scrub      {multi|id="guide-channel"|">|</option>|</select>}
*index_site_id.scrub           {multi(exclude="select ")|id="guide-channel"|value="|"|</select>}
** remove the 101 value in front of the channel name
*index_site_channel.modify     {remove(type=word)|0 1}
*end_scope
** @auto_xml_channel_end

into:

* @auto_xml_channel_start
* example of one entry <option value="89">101 M-Net</option>
scope.range {(channellist)|end}
index_site_channel.scrub      {multi|id="guide-channel"|">|</option>|</select>}
index_site_id.scrub           {multi(exclude="select ")|id="guide-channel"|value="|"|</select>}
* remove the 101 value in front of the channel name
index_site_channel.modify     {remove(type=word)|0 1}
end_scope
* @auto_xml_channel_end

old way
Look for the index_site_id and index_site_channel elements.

eg. change:

* enable the next four lines to create a channel list (file needs editting)
* change site_id to site_channel
* add site_channel with the group name
*index_site_channel.scrub {multi|<a href="#">Vlaams</a></h3>|v=0.1.11" alt="|" class|<div style="clear:both;"></div>}
*index_site_id.scrub {multi|<a href="#">Vlaams</a></h3>|v=0.1.11" alt="|" class|<div style="clear:both;"></div>}
*index_site_id.modify { cleanup (style=lower)}
*index_site_id.modify { replace| |-}

into:

* enable the next four lines to create a channel list (file needs editting)
* change site_id to site_channel
* add site_channel with the group name
index_site_channel.scrub {multi|<a href="#">Vlaams</a></h3>|v=0.1.11" alt="|" class|<div style="clear:both;"></div>}
index_site_id.scrub {multi|<a href="#">Vlaams</a></h3>|v=0.1.11" alt="|" class|<div style="clear:both;"></div>}
index_site_id.modify { cleanup (style=lower)}
index_site_id.modify { replace| |-}

2. Add only one dummy channel in the WebGrab++.config.xml file

<channel update="f" site="mysite.com" site_id="" xmltv_id="dummy">dummy</channel>

and only grab for 1 day

<timespan>0</timespan>

3. Now just run WG++ and your mysite.channels.xml file should be generated, if all goes well.

4. Just comment the .channels.xml generation out again. So revert what was done in step 1

* enable the next four lines to create a channel list (file needs editting)
* change site_id to site_channel
* add site_channel with the group name
*index_site_channel.scrub {multi|<a href="#">Vlaams</a></h3>|v=0.1.11" alt="|" class|<div style="clear:both;"></div>}
*index_site_id.scrub {multi|<a href="#">Vlaams</a></h3>|v=0.1.11" alt="|" class|<div style="clear:both;"></div>}
*index_site_id.modify { cleanup (style=lower)}
*index_site_id.modify { replace| |-}

into:

* enable the next four lines to create a channel list (file needs editting)
* change site_id to site_channel
* add site_channel with the group name
index_site_channel.scrub {multi|<a href="#">Vlaams</a></h3>|v=0.1.11" alt="|" class|<div style="clear:both;"></div>}
index_site_id.scrub {multi|<a href="#">Vlaams</a></h3>|v=0.1.11" alt="|" class|<div style="clear:both;"></div>}
index_site_id.modify { cleanup (style=lower)}
index_site_id.modify { replace| |-}

2.
Add only one dummy channel in the WebGrab++.config.xml file

<channel update="f" site="mysite.com" site_id="" xmltv_id="dummy">dummy</channel>

and only grab for 1 day

<timespan>0</timespan>

3.
Now just run WG++ and your mysite.channels.xml file should be generated, if all goes well.

4.
Just comment the .channels.xml generation out again. So revert what was done in step 1

 

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl