Squelch BS4 html parser warning

This commit is contained in:
2025-08-09 17:13:31 +00:00
parent 5d2290cabf
commit eb78eefaa4
2 changed files with 5 additions and 1 deletions

View File

@@ -6,6 +6,10 @@ import zipfile
import pypdf
from bs4 import BeautifulSoup
from mobi import Mobi
from bs4 import XMLParsedAsHTMLWarning
import warnings
warnings.filterwarnings("ignore", category=XMLParsedAsHTMLWarning)
from .api_hooks import DuckDuckGo
from .storage import Storage

View File

@@ -171,7 +171,7 @@ class Storage:
relative_parts = Path(file_name).relative_to(self.config.book_path).parts
except ValueError:
continue # skip books outside the configured path
breakpoint()
# breakpoint()
if len(relative_parts) < 2:
folder = relative_parts[1]
else: