On 07/15/2008 05:45 PM, Davide Alberani wrote:
> The default for oldParsers is False, so the new parsers are used.
> 
> I think this can improve a lot the debugging process.
> 

Yes, that has made it a lot easier.

As you predicted, parse_dom is becoming much more confusing. I'm getting 
lost in it also, so I've started an attempt to simplify it. I'll work 
from my home in the coming days, so I've committed my changes for easier 
access; if you disagree with them, please revert back :-)

My ideas are:

- remove 'section', use 'key' instead; if attribute is 'multi', make the 
element in the resulting dictionary a list

- remove extractor postprocessors, use attribute postprocessors

- all attribute xpaths will return strings (in dictionaries the values 
will be strings); these will be joined by the attribute joiner (empty 
string if not specified)

- remove 'single' from attributes; if we are only interested in the 
first item returned by xpath, we can use a position predicate

I've arranged most of the existing parsers, I'll handle the rest (movie 
vote details) soon.

I've also improved the bsoup interpreter. Position predicates are now 
handled in conformance with the specification (at least in our examples).

Turgut


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Imdbpy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to