From a506f2a88f6e073a2c45367a0f4cb8bab1f79bb7 Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Thu, 6 Feb 2025 10:19:28 +0100 Subject: [PATCH] Clarify that an extractor's method can also return False if no valid data was found --- src/auto_archiver/core/extractor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/auto_archiver/core/extractor.py b/src/auto_archiver/core/extractor.py index 98f1370..57320df 100644 --- a/src/auto_archiver/core/extractor.py +++ b/src/auto_archiver/core/extractor.py @@ -95,5 +95,11 @@ class Extractor(BaseModule): logger.warning(f"Failed to fetch the Media URL: {e}") @abstractmethod - def download(self, item: Metadata) -> Metadata: + def download(self, item: Metadata) -> Metadata | False: + """ + Downloads the media from the given URL and returns a Metadata object with the downloaded media. + + If the URL is not supported or the download fails, this method should return False. + + """ pass \ No newline at end of file