From 406add217c574dc1e0d9f374e36302a2368541c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 11 Aug 2016 13:20:21 +0200 Subject: [PATCH] print urls recursively --- gallery_dl/job.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gallery_dl/job.py b/gallery_dl/job.py index 6217eeee..a514ba95 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -46,9 +46,6 @@ class DownloadJob(Job): self.directory_fmt = os.path.join(*segments) def run(self): - if self.extractor is None: - return - for msg in self.extractor: if msg[0] == Message.Url: self.download(msg) @@ -140,8 +137,6 @@ class KeywordJob(Job): """Print available keywords""" def run(self): - if self.extractor is None: - return for msg in self.extractor: if msg[0] == Message.Url: print("Keywords for filenames:") @@ -164,11 +159,15 @@ class UrlJob(Job): """Print download urls""" def run(self): - if self.extractor is None: - return for msg in self.extractor: if msg[0] == Message.Url: print(msg[1]) + elif msg[0] == Message.Queue: + try: + UrlJob(msg[1]).run() + except exception.NoExtractorError: + pass + class HashJob(DownloadJob):