ZAP2XML : Convert zap2it TV listings to XMLTV or XTVD .xml - Internet Archive

ZAP2XML : Convert zap2it TV listings to XMLTV or XTVD .xml
zap2xml is a small and fast command line script that connects to a Zap2it or TVGuide account, downloads the tv listings data, and converts it to XMLTV or XTVD formatted .xml

*You are welcome to try an alternative tv listings utility: mc2xml

zap2xml zap2it.com setup:
  1. Register your free Zap2it.com account
  2. Click Change Provider to select a lineup (select country and input zipcode)
  3. Optionally select your favorite channels (click the channel stars or click "Find Channels" link) to limit channel output
  4. You may need to install the required supporting perl libraries (not needed with the Par-Packed Windows file)
  5. Run zap2xml with the userEmail and password parameters of your account
    • Example: zap2xml -u zap2xmluser@email.xx -p password
  6. Optionally set up a cron job/task scheduler task to run it every day

zap2xml tvguide.com setup:
  1. Register your free TVGuide.com account
  2. Click Change to select your provider (input zip code or pick a country and select lineup)
  3. Optionally select your favorite channels (click the channel hearts or click "Favorites" link) to limit channel output
  4. You may need to install the required supporting perl libraries (not needed with the Par-Packed Windows file)
  5. Run zap2xml with "-z" parameter, along with the userEmail and password parameters of your account
    • Example: zap2xml -z -u tvguideuser@email.xx -p password
  6. 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"
-eencode entities (html special characters like accents)
-Foutput channel names first (rather than "number name")
-Ouse old tv_grab_na style channel ids (C###nnnn.zap2it.com)
-9use old style channel ids (I#.labs.zap2it.com)
-Mcopy movie_year to empty movie sub-title tags
-UUTF-8 encoding (default = "ISO-8859-1")
-Loutput "<live />" tag (not part of xmltv.dtd)
-Tdon't cache files with programs "TBA|To Be Announced"
-Dinclude extra program details = 1 http request per program!
-Wtvg: -D only for movies = 1 http request per movie!
-Itvg: include program image URLs - 1 http request per program!
-bretain website channel order
-xoutput XTVD xml file format (default = XMLTV)
-wwait on exit (require keypress before exiting)
-qquiet (no status output)
-zuse tvguide.com instead of zap2it.com
-aoutput all channels (not just favorites)
-jadd "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"
please verify downloaded filesize to make sure your download is complete!
downloads are for personal use only, not for redistribution, conversion, integration or other use

 Perl Downloads 
file: zap2xml.pl
size: 50660 bytes
Download


 Windows Downloads 
file: zap2xml-install.exe
size: 3827855 bytes
Download
* A self extracting PAR packed Windows binary
(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

1 comment:

  1. The TV Guide option no longer works and the download links are broken. Please fix them them if you can.\,

    ReplyDelete