Difference between revisions of "XMLTVGrabbers"

From XMLTV
Jump to: navigation, search
(Created page with " == Using XMLTV grabbers == The XMLTVProject includes two major classes of tools. * Grabbers -- These tools obtain data in XMLTV format. * Filters -- These tools modify d...")
(No difference)

Revision as of 10:41, 10 April 2026

Using XMLTV grabbers

The XMLTVProject includes two major classes of tools.

  • Grabbers -- These tools obtain data in XMLTV format.
  • Filters -- These tools modify data in XMLTV format

In this post, we're going to focus on the Grabbers.

NOTE FOR WINDOWS USERS

The xmltv tools are command line tools. Of course you can put them in batch files too (and most folks do!). For now, open a COMMAND PROMPT and get started!

A pre-compiled perl distribution is included in an XMLTV.EXE file. This includes most grabbers and filters! To use it simply download the release file from the XMLTV releases or the ALPHA EXE. Save the file in a directory (safer one without spaces... say c:\xmltv) then use it!

To use xmltv.exe simply prefix the xmltv tool with xmltv.exe (or just xmltv). for example:

cd \xmltv
xmltv tv_grab_na_dd --configure

WARNING: The first time you run xmltv.exe it will take a long time, this is normal.

CONFIGURING A GRABBER

The Grabbers are very consistent in how to use them. That said, a few are different (tv_grab_zz_sdjson_sqlite comes to mind), so read the messages, just don't hit enter! The Grabbers tend to provide useful defaults for most questions.

The first step is the CONFIGURE step.

grabber --configure

Then answer the questions! yes, it's that easy. You only need to do this once, or when things change. no need to put it in your grabber script.

Once that's done and you're ready to go!

GRABBING LISTINGS

This is even easier, as everything is already configured! The below command will output 7 days to tv.xml

grabber --days 7 --output tv.xml

Leave off --days and you're get that grabber's default value. Leave off --outout and the outout will be written to STDOUT (in case you want to pipe to a filter!)

That's it! It really is easy.

Example first use

This example uses a grabber against [Direct's] service. An account is needed (free 7 day trial, no CC needed, so make sure it works for you before paying!)