Skip to content

Commit b56842d

Browse files
Backport PR #58100 on branch 2.2.x (MNT: fix compatibility with beautifulsoup4 4.13.0b2) (#58137)
Backport PR #58100: MNT: fix compatibility with beautifulsoup4 4.13.0b2 Co-authored-by: Clément Robert <[email protected]>
1 parent 0f83d50 commit b56842d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pandas/io/html.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -591,14 +591,8 @@ class _BeautifulSoupHtml5LibFrameParser(_HtmlFrameParser):
591591
:class:`pandas.io.html._HtmlFrameParser`.
592592
"""
593593

594-
def __init__(self, *args, **kwargs) -> None:
595-
super().__init__(*args, **kwargs)
596-
from bs4 import SoupStrainer
597-
598-
self._strainer = SoupStrainer("table")
599-
600594
def _parse_tables(self, document, match, attrs):
601-
element_name = self._strainer.name
595+
element_name = "table"
602596
tables = document.find_all(element_name, attrs=attrs)
603597
if not tables:
604598
raise ValueError("No tables found")

0 commit comments

Comments
 (0)