ZAP2XML : Convert zap2it TV listings to XMLTV or XTVD .xml
* | You are welcome to try an alternative tv listings utility: mc2xml |
zap2xml zap2it.com setup:
- Register your free Zap2it.com account
- Click Change Provider to select a lineup (select country and input zipcode)
- Optionally select your favorite channels (click the channel stars or click "Find Channels" link) to limit channel output
- You may need to install the required supporting perl libraries (not needed with the Par-Packed Windows file)
- Run zap2xml with the userEmail and password parameters of your account
- Example: zap2xml -u zap2xmluser@email.xx -p password
- Optionally set up a cron job/task scheduler task to run it every day
zap2xml tvguide.com setup:
- Register your free TVGuide.com account
- Click Change to select your provider (input zip code or pick a country and select lineup)
- Optionally select your favorite channels (click the channel hearts or click "Favorites" link) to limit channel output
- You may need to install the required supporting perl libraries (not needed with the Par-Packed Windows file)
- Run zap2xml with "-z" parameter, along with the userEmail and password parameters of your account
- Example: zap2xml -z -u tvguideuser@email.xx -p password
- Optionally set up a cron job/task scheduler task to run it every day
zap2xml options (case sensitive):
-u <username> | username | |
-p <password> | password | |
-d <#> | number of tv schedule days (default = 7) | |
-n <#> | # of no-cache days (from end) (default = 0) | |
-N <#> | # of no-cache-days (from start) (default = 0) | |
-B <#> | single no cache day | |
-s <#> | start day offset (default = 0) | |
-m <#> | offset program times by # minutes (better to use TZ env var) | |
-r <#> | # of connection retries before failure (default = 3, max 20) | |
-S <#> | seconds to sleep between requests to prevent flooding | |
-c <dir> | cache directory name (default = "cache") | |
-i <dir> | icon directory (default = don't download channel icons) | |
-o <file> | output xml filename (default = "xmltv.xml") | |
-C <file> | configuration file (default = "~/.zap2xmlrc") | |
-J <file> | include xmltv file in output | |
-l <lang> | lang (default = "en") | |
-Y <lineupId> | if not using username/password | |
-Z <zipcode> | if not using username/password | |
-P <http://h:p> | to use an http host:port proxy | |
-E "amp apos quot lt gt" | selectively encode standard XML entities | |
-A "new live" | append " *" to program titles that are "new" and/or "live" | |
-e | encode entities (html special characters like accents) | |
-F | output channel names first (rather than "number name") | |
-O | use old tv_grab_na style channel ids (C###nnnn.zap2it.com) | |
-9 | use old style channel ids (I#.labs.zap2it.com) | |
-M | copy movie_year to empty movie sub-title tags | |
-U | UTF-8 encoding (default = "ISO-8859-1") | |
-L | output "<live />" tag (not part of xmltv.dtd) | |
-T | don't cache files with programs "TBA|To Be Announced" | |
-D | include extra program details = 1 http request per program! | |
-W | tvg: -D only for movies = 1 http request per movie! | |
-I | tvg: include program image URLs - 1 http request per program! | |
-b | retain website channel order | |
-x | output XTVD xml file format (default = XMLTV) | |
-w | wait on exit (require keypress before exiting) | |
-q | quiet (no status output) | |
-z | use tvguide.com instead of zap2it.com | |
-a | output all channels (not just favorites) | |
-j | add "series" category to all non-movie programs |
Example 1: zap2xml -u zap2xmluser@email.xx -p password -A "new" -i icons
Example 2: zap2xml -z -u tvguideuser@email.xx -p password -o myfile.xml
To minimize web traffic zap2xml keeps all downloaded files in a cache subdirectory. It deletes old files in this directory based on last access time. (if last access > days + 2)
zap2xml uses your system's time and timezone so make sure your system clock is correct. Set your TZ environment variable before running zap2xml if you want to change the timezone of scheduled programs (ie: export TZ=GMT).
zap2xml is written in perl. Perl is also packaged for windows and needs the TimeDate package to be installed from the Perl Package Manager (ppm install TimeDate))
zap2xml relies on some standard perl libraries. If you run the script and a Perl error message states that it is missing a library you can use "perl -MCPAN -e shell" from your shell to install these dependencies (example: "install IO::HTML") or they may be available through apt-get depending on your distribution.
Example for OSMC: "sudo apt-get install libcompress-raw-zlib-perl libhtml-parser-perl libhttp-cookies-perl liblwpx-paranoidagent-perl libconfig-json-perl libjson-xs-perl"
Example for OSMC: "sudo apt-get install libcompress-raw-zlib-perl libhtml-parser-perl libhttp-cookies-perl liblwpx-paranoidagent-perl libconfig-json-perl libjson-xs-perl"
downloads are for personal use only, not for redistribution, conversion, integration or other use
Perl Downloads |
| ||
|
Windows Downloads |
| ||
|
(if you don't want to install perl on windows)
Windows Note: "Can't locate URI.pm" error usually means something
(virus scanner?) deleted that standard perl file when it was extracted to your
C:\Users\Name\AppData\Local\Temp\par-### folder
Delete that temp cache dir and retry (ensure URI.pm isn't deleted again)
If your virus scanner returns a false positive result on the windows install.exe
you can install Perl and run the text file perl (.pl) script
The TV Guide option no longer works and the download links are broken. Please fix them them if you can.\,
ReplyDelete