The MinimalSoup class is for parsing HTML that contains pathologically bad markup. It makes no assumptions about tag nesting, but it does know which tags are self-closing, that tags contain Javascript and should not be parsed, that META tags may contain encoding information,
| 1660 | I_CANT_BELIEVE_THEYRE_NESTABLE_INLINE_TAGS) |
| 1661 | |
| 1662 | class MinimalSoup(BeautifulSoup): |
| 1663 | """The MinimalSoup class is for parsing HTML that contains |
| 1664 | pathologically bad markup. It makes no assumptions about tag |
| 1665 | nesting, but it does know which tags are self-closing, that |
| 1666 | <script> tags contain Javascript and should not be parsed, that |
| 1667 | META tags may contain encoding information, and so on. |
| 1668 | |
| 1669 | This also makes it better for subclassing than BeautifulStoneSoup |
| 1670 | or BeautifulSoup.""" |
| 1671 | |
| 1672 | RESET_NESTING_TAGS = buildTagMap('noscript') |
| 1673 | NESTABLE_TAGS = {} |
| 1674 | |
| 1675 | class BeautifulSOAP(BeautifulStoneSoup): |
| 1676 | """This class will push a tag with only a single string child into |
nothing calls this directly
no test coverage detected
searching dependent graphs…