diff --git a/htmldate/__init__.py b/htmldate/__init__.py index d4b040dc..1042dc3e 100644 --- a/htmldate/__init__.py +++ b/htmldate/__init__.py @@ -12,8 +12,8 @@ import logging -from datetime import datetime - from .core import find_date logging.getLogger(__name__).addHandler(logging.NullHandler()) + +__all__ = ["find_date"] diff --git a/htmldate/utils.py b/htmldate/utils.py index 1b08decf..be9c4e3f 100644 --- a/htmldate/utils.py +++ b/htmldate/utils.py @@ -207,7 +207,7 @@ def load_html(htmlobject: Union[bytes, str, HtmlElement]) -> Optional[HtmlElemen if ( isinstance(htmlobject, str) and htmlobject.startswith("http") - and not " " in htmlobject + and " " not in htmlobject ): LOGGER.debug("URL detected, downloading: %s", htmlobject) htmlobject = fetch_url(htmlobject) # type: ignore[assignment]