diff --git a/src/markitdown/__init__.py b/src/markitdown/__init__.py index 81ab842..482f428 100644 --- a/src/markitdown/__init__.py +++ b/src/markitdown/__init__.py @@ -2,8 +2,10 @@ # # SPDX-License-Identifier: MIT -from ._markitdown import MarkItDown +from ._markitdown import MarkItDown, FileConversionException, UnsupportedFormatException __all__ = [ "MarkItDown", + "FileConversionException", + "UnsupportedFormatException", ] diff --git a/src/markitdown/_markitdown.py b/src/markitdown/_markitdown.py index a0c479e..96997cf 100644 --- a/src/markitdown/_markitdown.py +++ b/src/markitdown/_markitdown.py @@ -999,7 +999,8 @@ def convert_response( fh.close() # Use puremagic to check for more extension options - self._append_ext(extensions, self._guess_ext_magic(temp_path)) + for g in self._guess_ext_magic(temp_path): + self._append_ext(extensions, g) # Convert result = self._convert(temp_path, extensions, url=response.url) @@ -1093,7 +1094,7 @@ def _guess_ext_magic(self, path): pass except PermissionError: pass - return None + return [] def register_page_converter(self, converter: DocumentConverter) -> None: """Register a page text converter."""