jbogers / ziggogo-epg

An EPG graber for Ziggo TVHeadend users
GNU General Public License v3.0
8 stars 2 forks source link
tvheadend xmltv ziggo

ZiggoGo EPG

This script grabs EPG data from the ZiggoGo TV service and formats it into XMLTV format. This script is designed for use with TVHeadend, but can also be used in standalone mode.

ZiggoGo EPG optimizes grabbing on TV information by using a cache database (implemented using SQLite). By reusing this cache between runs, the amount of data downloading is severely reduced. This has 2 main advantages. First of all, grabbing is a lot faster (except for the initial run, obviously) as a lot less requests to the Ziggo server need to be made. Secondly, because a lot less request are being made to the Ziggo server, the impact of running ZiggoGo EPG on these servers will be limited.

Even though ZiggoGo EPG is optimized, it is not recommended to run this program more than twice a day. If more frequent XMLTV generation is desired (for example, for testing purposes), use the --generate-only flag. See the Usage section for more details.

TVHeadend mode

In this mode, TVHeadend will be asked to provide a list of known TV channels. The script will try to match these up to the ZiggoGo EPG and only grab data for these channels. Once the EPG data has been grabbed, the resulting XMLTV data is directly written to TVHeadend without creating an intermediate file.

The TVHeadend mode is the recommended mode for ZiggoGo EPG and is thus the default mode.

Standalone mode

In this mode, the channel list will be read from an input file (recommended) or can be given per channel on the command line. The XMLTV data will then be output to the file of choice.

For convenience, ZiggoGo EPG can output all known channels to a file. This file can be edited to the users desire and then used as the input file.

Requirements

Python 3.6+ is required to run this script. In addition, some external Pyton packages are used. These are listed in the requirements.txt file. You can easily install these packages using the following command:

pip install -r requirements.txt

Usage

For a quick overview of all available options, run:

./ziggogoepg.py --help

ZiggoGo EPG supports the following basic options:

The following options are supported in TVHeadend mode:

The following options are supported in standalone file mode:

The following options are tweaks that can be used by advanced users:

Adding configurations

Configuration files are stored with the ZiggoGo EPG program in .yml (YAML) files. To create a new configuration it is easiest to copy an existing one and name it accordingly for your region. In the configuration file, you can adjust the URL's used to grab the EPG data from and set an appropriate timezone for the resulting XMLTV file. Note that this grabber only works with systems from Ziggo/UPC/Liberty Global and you will have to figure out the URL's yourself by observing the network traffic of the online viewing application from your local provider.

The following configuration options are available:

After creating the configuration, place it in the ziggogo-epg application location and call ziggogoepg.py with the -s/--configuration option, where the value is the name ofthe file without the .yml extension (for example, to use upc-pl.yml, you would call ziggogoepg.py with the option -s upc-pl).

Acknowledgments

Inspiration for the script has been taken from https://github.com/beralt/horepg. While all code is new, some operational ideas (like automatic channel matching with TvHeaded) came from this project.

Thank you Beralt for your hard work on horepg!

Also thanks to:

TODO's