Check at least 1 URL provided for new cli_feeder module rewrite

pull/217/head
Patrick Robertson 2025-02-26 17:59:13 +00:00
rodzic 70d89c71ce
commit f58f110436
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -5,6 +5,11 @@ from auto_archiver.core.metadata import Metadata
class CLIFeeder(Feeder):
def setup(self) -> None:
self.urls = self.config['urls']
if not self.urls:
raise ValueError("No URLs provided. Please provide at least one URL via the command line, or set up an alternative feeder. Use --help for more information.")
def __iter__(self) -> Metadata:
urls = self.config['urls']
for url in urls: