Re: A new tv_grab_API

Hika van den Hoven <[email protected]> Mon, 17 Oct 2016 12:11:06 +0200
Newsgroups gmane.comp.tv.xmltv.devel
Message-ID <[email protected]>
Hoi Robert,

Monday, October 17, 2016, 4:26:10 AM, you wrote:

> On 10/16/2016 7:17 AM, Hika van den Hoven wrote:
>> I'm a little confused on what you've created. Is this a python
>>> equivalent to xmltv.pm?
>> I do not know xmltv.pm, so I can not compare.
>> It's a data driven API. You create the JSON data files telling it
>> where and what to grab and it returns a nice xmltv file. DataTreeGrab
>> imports any html or json page into a node tree and you tell the
>> program how to crawl through that tree and at which points to extract
>> data returning it in a uniform format to the main API. The main API
>> merges the data from all the sources (11 at present for the Dutch
>> grabber) and returns the xmltv file. This whole proces is
>> manipulatable in a lot of ways by the maintainer and by the user.
>> By the first through the JSON data files and by the user through many
>> settable options.

> xmltv.pm is a perl library with tools to make it easier to generate a 
> valid XMLTV formatted file.  Based on your description, you have 
> something different.

> So, to summarize your utility, it's a Python script that generates XMLTV
> by parsing a web based JSON or XML (including HTML) source into a tree
> and running that tree against a JSON based definition language to 
> mapping tree leaves to a XMLTV record.

> Right?

> Robert

Basically. Only it's HTML including XML and it is a three, four step
process with one of those steps being the merging of multiple sources
and selective ttvdb lookup. The extraction is at first to a dict and
only the last step is the XMLTV creation, making it also possible to
add possible different output formats. It would also be relative easy
to add other extraction formats then JSON or HTML.

Tot mails,
  Hika Alina Maria van den Hoven                            mailto:[email protected]

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens
--


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot