diff --git a/puppygirl/elements/shadow_root.py b/puppygirl/elements/shadow_root.py index 97b82c9..977eb91 100644 --- a/puppygirl/elements/shadow_root.py +++ b/puppygirl/elements/shadow_root.py @@ -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):