summaryrefslogtreecommitdiff
path: root/bs4/element.py
AgeCommit message (Collapse)Author
2018-12-31Improved and tested error checking for insert_before and insert_after.Leonard Richardson
2018-12-30Add convienances for inserting multiple tagsIsaac Muse
Add extend method to append a list of tags. Make insert_before and insert_after accept multiple arguments
2018-12-30Fixed a problem with multi-valued attributes where the valueLeonard Richardson
contained whitespace. Thanks to Jens Svalgaard for the fix. [bug=1787453]
2018-12-24Clarified the software license.Leonard Richardson
2018-12-24Issue a warning and raise a more useful exception if someone tries to call ↵Leonard Richardson
Tag.select() without SoupSieve installed.
2018-12-24Keep track of the namespace abbreviations found while parsing the document. ↵Leonard Richardson
This makes select() work most of the time without requiring a value for 'namespaces'.
2018-12-23Merging Isaac Muse's Soup Sieve branch as-is before making some modifications.Leonard Richardson
2018-12-22Fix next and previous linkage issues. Fixes issues #1806598 and #1782928.Isaac Muse
2018-12-20Pass flags to soupsieve.Isaac Muse
2018-12-19Add Soup Sieve supportIsaac Muse
2018-07-30Fix an exception when a custom formatter was asked to format a voidLeonard Richardson
element. [bug=1784408]
2018-07-28When markup contains duplicate elements, a select() call thatLeonard Richardson
includes multiple match clauses will match all relevant elements. [bug=1770596]
2018-07-21Clarified the deprecation warning when accessing tag.fooTag, to coverLeonard Richardson
the possibility that you might really have been looking for a tag called 'fooTag'.
2018-07-18Fixed a bug where find_all() was not working when asked to find aLeonard Richardson
tag with a namespaced name in an XML document that was parsed as HTML. [bug=1723783]
2018-07-15Introduced the Formatter system. [bug=1716272].Leonard Richardson
2018-07-15It's possible for a TreeBuilder subclass to specify that voidLeonard Richardson
elements should be represented as <element> rather than <element/>, by setting TreeBuilder.void_element_close_prefix to the empty string. [bug=1716272]
2018-07-14Fixed a disconnected parse tree when one BeautifulSoup object wasLeonard Richardson
inserted into another. [bug=1105148]
2018-07-14Fixed code that was causing deprecation warnings in recent Python 3Leonard Richardson
versions. Includes a patch from Ville Skyttä. [bug=1778909] [bug=1689496]
2017-05-07Namespace prefix is preserved when an XML tag is copied. ThanksLeonard Richardson
to Vikas for a patch and test. [bug=1685172]
2017-05-06Replace get_attribute_text with get_attribute_list.Leonard Richardson
2017-05-06Renamed convenience method to get_attribute_text.Leonard Richardson
2017-05-06Added the method, which acts like forLeonard Richardson
getting the value of an attribute, but which joins attribute multi-values into a single string value. [bug=1678589]
2017-05-06It's now possible to use a tag's namespace prefix when searching,Leonard Richardson
e.g. soup.find('namespace:tag') [bug=1655332]
2017-05-06Implement ResultSet.__getattr__ to give a helpful message in a common error ↵Leonard Richardson
scenario.
2016-07-26Spelling fixesVille Skyttä
2016-07-18If a search against each individual value of a multi-valuedLeonard Richardson
attribute fails, the search will be run one final time against the complete attribute value considered as a single string. [bug=1476868]
2016-07-18Added support for CSS selector values that contain quoted spaces,Leonard Richardson
such as tag[style="display: foo"]. [bug=1540588]
2016-07-18The argument to now works correctly, though it'sLeonard Richardson
not implemented very efficiently. [bug=1520530]
2016-07-17Use known_xml instead of continually adding underscores to is_xml.Leonard Richardson
2016-07-17Whenever possible, keep track ahead of time whether a PageElement is HTML or ↵Leonard Richardson
XML.
2016-07-16Removed imports to pdb, since pdb is not available in some environments. ↵Leonard Richardson
[bug=1491700]
2016-07-16The contents of <textarea> tags will no longer be modified when theLeonard Richardson
tree is prettified. [bug=1555829]
2016-07-16Added a separate class for XML processing instructions, which have a ↵Leonard Richardson
slightly different format from SGML processing instructions. [bug=1504383]
2016-07-16Rename COPYING.txt to LICENSE. Add a reference to LICENSE in every source file.Leonard Richardson
2015-09-28Add a __license__ statement to all source files.Leonard Richardson
2015-09-28Improved the implementation of CSS selector grouping. Thanks to Orangain for ↵Leonard Richardson
the patch. [bug=1484543]
2015-09-28Corrected the output of Declaration objects. [bug=1477847]Leonard Richardson
2015-09-28Fixed a bug that deranged the tree when part of it wasLeonard Richardson
removed. Thanks to Eric Weiser for the patch and John Wiseman for a test. [bug=1481520]
2015-09-28Don't allow inserting None into a tag.Leonard Richardson
2015-08-06Use identity comparisons for tree traversalEric Wieser
Otherwise, different NavigableStrings compare equal. Fixes Bug #1481520
2015-06-28Changed the way soup objects work under copy.copy(). Copying aLeonard Richardson
NavigableString or a Tag will give you a new NavigableString that's equal to the old one but not connected to the parse tree. Patch by Martijn Peters. [bug=1307490]
2015-06-28Copying a NavigableString will give you a new NavigableString that is not ↵Leonard Richardson
connected to the parse tree.
2015-06-28Fixed a bug where Element.extract() could create an infinite loop inLeonard Richardson
the remaining tree.
2015-06-28Raise a NotImplementedError whenever an unsupported CSS pseudoclassLeonard Richardson
is used in select(). Previously some cases did not result in a NotImplementedError.
2015-06-25Introduced the select_one() method, which uses a CSS selector butLeonard Richardson
only returns the first match, instead of a list of matches. [bug=1349367]
2015-06-25The text argument to the find_* methods is now called string,Leonard Richardson
which is more accurate. text still works, but is the argument described in the documentation. text may eventually change its meaning, but not for a very long time. [bug=1366856]
2015-06-25Make it possible to invoke the Tag() constructor without providing a ↵Leonard Richardson
builder. [bug=1307471]
2015-06-25You can now create a NavigableString or a subclass just by invokingLeonard Richardson
the constructor. [bug=1294315]
2015-06-25Improved the exception raised when you call .unwrap() orLeonard Richardson
.replace_with() on an element that's not attached to a tree.
2015-06-25__repr__ now returns an ASCII bytestring in Python 2, and a Unicode string ↵Leonard Richardson
in Python 3, instead of a UTF8-encoded bytestring in both versions. [bug=1420131]