mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Squelch BS4 html parser warning
This commit is contained in:
4
src/backend/lib/library.py
vendored
4
src/backend/lib/library.py
vendored
@@ -6,6 +6,10 @@ import zipfile
|
|||||||
import pypdf
|
import pypdf
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from mobi import Mobi
|
from mobi import Mobi
|
||||||
|
from bs4 import XMLParsedAsHTMLWarning
|
||||||
|
import warnings
|
||||||
|
|
||||||
|
warnings.filterwarnings("ignore", category=XMLParsedAsHTMLWarning)
|
||||||
|
|
||||||
from .api_hooks import DuckDuckGo
|
from .api_hooks import DuckDuckGo
|
||||||
from .storage import Storage
|
from .storage import Storage
|
||||||
|
|||||||
2
src/backend/lib/storage.py
vendored
2
src/backend/lib/storage.py
vendored
@@ -171,7 +171,7 @@ class Storage:
|
|||||||
relative_parts = Path(file_name).relative_to(self.config.book_path).parts
|
relative_parts = Path(file_name).relative_to(self.config.book_path).parts
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue # skip books outside the configured path
|
continue # skip books outside the configured path
|
||||||
breakpoint()
|
# breakpoint()
|
||||||
if len(relative_parts) < 2:
|
if len(relative_parts) < 2:
|
||||||
folder = relative_parts[1]
|
folder = relative_parts[1]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user