This commit is contained in:
Rowan 2025-10-08 02:20:43 -04:00
parent 393e01d7e9
commit 4ff8c37160

View file

@ -34,7 +34,7 @@ class Node(Clonable):
def from_path(path: str) -> Self:
with open(path, "r") as f:
return Node(BeautifulSoup(f.read(), 'html.parser'))
return Node(BeautifulSoup(f.read(), 'html.parser').find())
def from_element(element: "Parsable") -> Self:
if isinstance(element, Node):
@ -94,7 +94,7 @@ class Template(Clonable):
def from_path(path: str) -> Self:
with open(path, "r") as f:
return Template(BeautifulSoup(f.read(), 'html.parser'))
return Template(BeautifulSoup(f.read(), 'html.parser').find())
def from_element(element: "Parsable") -> Self:
if isinstance(element, Template):