summaryrefslogtreecommitdiff
path: root/src/lxml/html
Commit message (Collapse)AuthorAgeFilesLines
...
* clean up importsStefan Behnel2017-08-131-1/+3
|
* LP#1567526: Make soupparser sort-of handle empty and plain text input ↵Stefan Behnel2017-08-132-3/+17
| | | | instead of raising a TypeError.
* Update docstrings to reflect the new behaviour of the "guess_charset" option ↵Stefan Behnel2017-08-131-9/+20
| | | | in html5parser.
* Adapt defaults for "guess_charset" option in the remaining parse functions.Stefan Behnel2017-08-131-2/+2
|
* Adapt defaults for "guess_charset" option when parsing from files and URLs ↵Stefan Behnel2017-08-131-2/+22
| | | | to avoid passing "useChardet" when it's likely to fail.
* Back out GH issue #232 again as a retry should not be triggered internally ↵Stefan Behnel2017-08-131-36/+6
| | | | by lxml. Users should do it explicitly if they think they need it.
* Fix tests after making "useChardet" handling smarter.Stefan Behnel2017-08-121-5/+16
|
* Only pass "useChardet" option into html5parser by default if the input is a ↵Stefan Behnel2017-08-121-6/+18
| | | | byte string. Should help with LP#1654544.
* Make class Py2 compatible.Stefan Behnel2017-08-121-1/+1
|
* Merge pull request #232 from ondergetekende/1654544scoder2017-08-121-5/+38
|\ | | | | Fix LP1654544
| * Make sure the html5lib tests are included in CIKoert van der Veer2017-03-201-20/+22
| |
| * Build a retry mechanism around html5lib's unpredictable useChardet supportKoert van der Veer2017-03-161-2/+33
| | | | | | | | Closes LP1654544
* | soupparse: add test case for double-hyphenha shao2017-07-291-0/+11
| |
* | soupparser: Use html.HtmlComment() to create commendha shao2017-07-291-3/+1
| |
* | Soupparser: Fix "No parser was explicitly specified" warningha shao2017-07-281-1/+1
| | | | | | | | | | Seems that beautifulsoup won't handle using list as `features` properly.
* | Soupparser: Fix bug with double hyphen (--) in comment elementha shao2017-07-281-0/+2
| |
* | Fix a typo: referrs -> refersFelix Yan2017-06-121-1/+1
| |
* | Remove unused imports.Chris Gavin2017-04-243-4/+4
| |
* | Python 3.6 invalid escape sequence deprecation fixesVille Skyttä2017-03-191-1/+1
| | | | | | | | https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
* | merge lxml-3.7 branch into masterStefan Behnel2017-03-181-4/+4
|\ \
| * | improve type check and commentStefan Behnel2017-03-181-4/+4
| | |
| * | Perform full-document detection on decoded bytes.Koert van der Veer2017-03-162-1/+14
| | | | | | | | | | | | Closes #1673355
* | | Merge pull request #233 from ondergetekende/1673355scoder2017-03-182-1/+14
|\ \ \ | | | | | | | | Fix LP1673355
| * | | Perform full-document detection on decoded bytes.Koert van der Veer2017-03-162-1/+14
| | |/ | |/| | | | | | | Closes #1673355
* | | fix spelling mistakes originally found by scop in GH#230Stefan Behnel2017-03-181-1/+1
| | |
* | | Merge pull request #235 from jwilk/cruftscoder2017-03-181-6/+0
|\ \ \ | | | | | | | | remove obsolete compat code
| * | | remove conditional imports of the set moduleJakub Wilk2017-03-171-6/+0
| |/ / | | | | | | | | | These were needed for Python 2.3, which is no longer supported.
* | | allow hyphens in mailto: hostsJakub Wilk2017-03-161-1/+1
|/ /
* | add tests for bug #1665241Ashish Kulkarni2017-02-161-1/+25
| |
* | fix html.SelectElement stripping whitespace from <option> valuesAshish Kulkarni2017-02-161-19/+6
| | | | | | | | | | | | This is a fix for bug #1665241, as the original fix for #399249 in 0b14af50fdc878199f8a3be3053eef42d3e9851f should not apply to option values, which are supposed to be passed through as-is.
* | Fix POST form submission for Python 3Jakub Wilk2017-02-081-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | In Python 3, urlencode() returns Unicode string; but urlopen() wants only bytes in data, so it need to be encoded first. Fixes: >>> form = lxml.html.fromstring('<form method="POST">', base_url='http://localhost') >>> lxml.html.submit_form(form) Traceback (most recent call last): File "<stdin>", line 1, in <module> File ".../lxml/html/__init__.py", line 1119, in submit_form return open_http(form.method, url, values) File ".../lxml/html/__init__.py", line 1140, in open_http_urllib return urlopen(url, data) File ".../urllib/request.py", line 163, in urlopen return opener.open(url, data, timeout) File ".../urllib/request.py", line 464, in open req = meth(req) File ".../urllib/request.py", line 1183, in do_request_ raise TypeError(msg) TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str.
* Merge pull request #197 from creitiv/ignore-disabled-inputsscoder2016-08-202-2/+4
|\ | | | | Ignore disabled form inputs
| * ignore disabled form inputsKristian Klemon2016-07-262-2/+4
| |
* | adapt docs to actual behaviourStefan Behnel2016-08-131-7/+6
| |
* | allow el.set("attr") in HTML trees without having to specify an explicit ↵Stefan Behnel2016-07-291-1/+11
|/ | | | None value
* make the "inline_style" option in Cleaner default to (but independent of) ↵Stefan Behnel2016-07-241-5/+9
| | | | the "style" option
* Merge pull request #180 from chripede/patch-2scoder2016-07-242-3/+27
|\ | | | | Add inline_style option
| * Fix tests for inline_styleChristian Pedersen2015-11-201-2/+21
| |
| * Add inline_style optionChristian Pedersen2015-11-191-1/+6
| | | | | | | | Currently the style option will remove both style tags and attributes. This change makes each an option, just like scripts and javascript.
* | Exclude `file` field `value` from `FormElement.form_values`.Tomas Divis2016-07-202-1/+3
| | | | | | | | Similar to `submit`, `image` and `reset`, browsers don't send `file` field values in the POST when form is submitted. `FormElement.form_values` method already correctly excluded `submit`, `image` and `reset` fields, now it also excludes the `file` fields.
* | Fix unichr bug on Python3Duncan Morris2016-02-221-0/+7
|/
* Add a cssselect method to all elements, not just HtmlElementSimon Sapin2012-04-201-1/+2
| | | | | | translator defaults to 'xml' in _Element and 'html' in HtmlElement (Add it back again, but on a separate pull request.)
* Merge pull request #162 from hbrunn/master-allow-image-dataurlsscoder2015-09-041-1/+8
|\ | | | | [IMP] allow dataurls if they point to images
| * [IMP] allow dataurls if they point to imagesHolger Brunn2015-03-041-1/+8
| | | | | | | | fixes #145
* | Merge pull request #153 from masklinn/simplify-SetMixinscoder2015-09-041-79/+16
|\ \ | | | | | | Simplify SetMixin by rebuilding it on top of MutableSet
| * | Simplify SetMixin by rebuilding it on top of MutableSetmasklinn2014-12-171-79/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SetMixin can't be removed entirely as: * MutableSet annoyingly does not include the method form of the operators on purpose: http://bugs.python.org/issue22089 * SetMixin provides a ``copy`` which was only used internally (?) but may be used by third parties Furthermore, because MutableSet and SetMixin differ in their abstract methods (MutableSet uses discard rather than remove, and __len__ and __contains__ are abstract) this would require significant edition of subclasses.
* | | avoid double recursion in BS tree conversionStefan Behnel2015-06-051-0/+11
| | |
* | | use node type based dispatch mechanism for BS tree conversion instead of ↵Stefan Behnel2015-06-051-24/+63
| | | | | | | | | | | | sequential type tests
* | | clean up BS4 changesStefan Behnel2015-06-051-17/+19
| | |
* | | simplify import check in test and keep original import exception on failuresStefan Behnel2015-06-051-13/+6
| | |