[weboob] ask for documentation!
romain at peerfuse.org
Mon Apr 12 11:11:23 CEST 2010
On 12/Apr - 11:00, Christophe Benz wrote:
> Crap, there is no doc about the browser and pages.
Yes, I think I should write documentation of all this classes and systems.
> I understood by reading the code that:
> * Browser.location opens a webpage with mechanize
> * the Parser parses the DOM
> * finds the corresponding class in the Browser.PAGES dict
> * calls the Page.loaded method.
This is basically how it works, yes.
> Since I only want to match an URL using a regex, and I don't want to
> deal with the DOM at all, where do I put the code? Do I have to write a
> dedicated parser, and not to use any page, or to use Page.loaded?
I think if you don't want to use any parser, you may use the openurl() method
instead of location(). You can see an example on
> I had a problem with StandardParser which did not accept some HTML
> code. I used the html5lib parser, like in aum backend.
> By the way, would it be possible to have all the parsers available
> in weboob.tools.parser(s)?
You're right, we should add every available parsers in weboob.tools.parser. For
example, weboob.backends.bnporc works with elementtidy but not with HTMLParser,
so there as you disabled the elementtidy parser, it does not work anymore.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 489 bytes
Desc: not available
More information about the weboob