[lxml-dev] lxml.html and forms
Ian Bicking
ianb at colorstudy.com
Tue Jul 17 19:44:00 CEST 2007
Stefan Behnel wrote:
> Hi,
>
> Ian Bicking wrote:
>> Stefan Behnel wrote:
>>>> OK, I guess that keyword argument should be available in all the parsing
>>>> functions.
>>> "string" parsing functions. Sure.
>> I'm not sure how to do this. lxml.etree.HTML doesn't take a base_url
>> argument
>
> It works for me in both trunk and html branch:
>
> def HTML(text, _BaseParser parser=None, base_url=None):
Really? Here's what I get on the html branch:
>>> from lxml.etree import HTML
>>> h = HTML('<span>', None, 'http://foo.com')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: function takes at most 2 arguments (3 given)
>>> h = HTML('<span>', base_url='http://foo.com')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: 'base_url' is an invalid keyword argument for this function
--
Ian Bicking : ianb at colorstudy.com : http://blog.ianbicking.org
: Write code, do good : http://topp.openplans.org/careers
More information about the lxml-dev
mailing list