Register your free Zap2it.com TV Listings account (zip/postal code and select lineup)
- Click "Set Preferences":
- Checkmark "Show six hour grid"
- Checkmark "Show only my favorite channels in the grid"
- Select your favorite channels from the "Available Channels" and put them in the "My Favorite Channels" list
- Click "Save"
- Run zap2xml with the userEmail and password parameters of your account
- Optionally set up a cron job/task scheduler task to run it every day
zap2xml options (case sensitive):
- -u <username>
- -p <password>
- -d <# of days> (default = 7)
- -n <# of no-cache days> (from end) (default = 0)
- -N <# of no-cache days> (from start) (default = 0)
- -s <start day offset> (default = 0)
- -o <output xml filename> (default = "xmltv.xml")
- -c <cacheDirectory> (default = "cache")
- -l <lang> (default = "en")
- -i <iconDirectoryi> (default = don't download channel icons)
- -m <#> = offset program times by # minutes (better to use TZ env var)
- -x = output XTVD xml file format (default = XMLTV)
- -w = wait on exit (require keypress before exiting)
- -q = quiet (no status output)
- -r <# of connection retries before failure> (default = 3, max 20)
- -e = encode entities (html special characters like accents)
- -E "amp apos quot lt gt" = selectively encode standard XML entities
- -F = output channel names first (rather than "number name")
- -O = use old tv_grab_na style channel ids (C###nnnn.zap2it.com)
- -A "new live" = append " *" to program titles that are "new" and/or "live"
- -U = UTF-8 encoding (default = "ISO-8859-1")
- -L = output "<live />" tag (not part of xmltv.dtd)
- -T = don't cache files containing programs with "To Be Announced" titles
- -P <http://proxyhost:port> = to use an http proxy
- -C <configuration file> (default = "~/.zap2xmlrc")
- -S <#seconds> sleep between requests to prevent flooding of server
- -D = include extra program details (S##E##) = 1 extra http request per program!
- -I = include program icons (image URLs) - 1 extra http request per program!
Example 1: "zap2xml -u [email protected] -p password"
Example 2: "zap2xml -u [email protected] -p password -o myfile.xml -e -D"
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))