Releases: scrapy/parsel
Releases · scrapy/parsel
v1.9.1
v1.9.0
- Now requires
cssselect >= 1.2.0(this minimum version was required since 1.8.0 but that wasn't properly recorded) - Removed support for Python 3.7
- Added support for Python 3.12 and PyPy 3.10
- Fixed an exception when calling
__str__or__repr__on some JSON selectors - Code formatted with
black - CI fixes and improvements
1.8.1
1.8.0
- Add support for JMESPath: you can now create a selector for a JSON document and call
Selector.jmespath(). - Selectors can now be constructed from
bytes(using thebodyandencodingarguments) instead ofstr(using thetextargument). - Typing improvements
- The
pkg_resourcesmodule (which was absent from the requirements) is no longer used - Documentation build fixes
1.7.0
- Add PEP 561-style type information
- Support for Python 2.7, 3.5 and 3.6 is removed
- Support for Python 3.9-3.11 is added
- Very large documents (with deep nesting or long tag content) can now be parsed, and Selector now takes a new argument huge_tree to disable this
- Support for new features of cssselect 1.2.0 is added
- The Selector.remove() and SelectorList.remove() methods are deprecated and replaced with the new Selector.drop() and SelectorList.drop() methods which don’t delete text after the dropped elements when used in the HTML mode.
1.6.0
v1.3.1
has-classXPath extension function;parsel.xpathfuncs.set_xpathfuncis a simplified way to register
XPath extensions;Selector.remove_namespacesnow removes namespace declarations;- Python 3.3 support is dropped;
make htmlviewcommand for easier Parsel docs development.- CI: PyPy installation is fixed; parsel now runs tests for PyPy3 as well.
1.3.1 was released shortly after 1.3.0 to fix pypi upload issue.
v1.2.0
- Add
get()andgetall()methods as aliases forextract_firstandextractrespectively - Add default value parameter to
SelectorList.re_firstmethod - Add
Selector.re_firstmethod - Bug fix: detect
Noneresult from lxml parsing and fallback with an empty document - Rearrange XML/HTML examples in the selectors usage docs
- Travis CI:
- Test against Python 3.6
- Test against PyPy using "Portable PyPy for Linux" distribution
v1.1.0
- Change default HTML parser to lxml.html.HTMLParser,
which makes easier to use some HTML specific features - Add css2xpath function to translate CSS to XPath
- Add support for ad-hoc namespaces declarations
- Add support for XPath variables
- Documentation improvements and updates