made bs4 and soupsieve standalone in this project

This commit is contained in:
2025-04-24 19:26:20 +02:00
parent aefb27614f
commit 3dd7b5a18d
17 changed files with 68 additions and 62 deletions

View File

@ -16,7 +16,7 @@ except ImportError as e:
'The soupsieve package is not installed. CSS selectors cannot be used.'
)
from ..bs4.formatter import (
from .formatter import (
Formatter,
HTMLFormatter,
XMLFormatter,
@ -380,7 +380,7 @@ class PageElement(object):
and not isinstance(new_child, NavigableString)):
new_child = NavigableString(new_child)
from ..bs4 import BeautifulSoup
from . import BeautifulSoup
if isinstance(new_child, BeautifulSoup):
# We don't want to end up with a situation where one BeautifulSoup
# object contains another. Insert the children one at a time.