On Jul 02, "H. Turgut Uyar" <[EMAIL PROTECTED]> wrote: > I've implemented a parser for this one too. It has been interesting > because I had to add a feature to section specification to access > instance attributes.
Seen - very useful for such a generic parser. For other parsers used for multiple pages (like persons/characters), maybe we can write two separated parser: after all the DOM approach spares so many lines of code... :-) > I did some more work on the parsers today, they're all in the CVS. An > important one is naming the fields of a composite attribute (like > birthdate=birthday+birthyear). I kept forgetting which element in the > tuple corresponded to which piece of information when writing the > postprocessor. I think the code is more readable now. Much better, even if I find the whole code a bit unpredictable (probably because I wrote portions of it without fully understanding XPath :-/) I still have to try to tell if the result will be a list, what will be they keys of the returned dictionary and so on. > Maybe the most important modification is that I've renamed the infamous > 'elem' to 'path' :-) Perfect name! I've committed support for names/titles references (mostly untested). As you can see from the GatherRefs class I still have some problems with DOM/XPath: I'm almost sure there is a cleaner way to obtain the same result. Speaking of that: I was thinking at a parser for the movie's quotes page, and I had some real trouble: the data is not in a <ul> list, but just separated by <hr> and I can't find an easy way to express - with XPath - the portion of document I need. Can you write me an example, for a parser for: http://akas.imdb.com/title/tt0133093/quotes ? Thanks! -- Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47] http://erlug.linux.it/~da/ ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Imdbpy-devel mailing list Imdbpy-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-devel