Skip to content

Commit

Permalink
MNT: fix compatibility with beautifulsoup4 4.13.0b2 (pandas-dev#58100)
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros authored and diogomsmiranda committed Apr 1, 2024
1 parent f2aa1d8 commit 97ebdc0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pandas/io/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,8 @@ class _BeautifulSoupHtml5LibFrameParser(_HtmlFrameParser):
:class:`pandas.io.html._HtmlFrameParser`.
"""

def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
from bs4 import SoupStrainer

self._strainer = SoupStrainer("table")

def _parse_tables(self, document, match, attrs):
element_name = self._strainer.name
element_name = "table"
tables = document.find_all(element_name, attrs=attrs)
if not tables:
raise ValueError("No tables found")
Expand Down

0 comments on commit 97ebdc0

Please sign in to comment.