mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
sensible output if no extractor found
This commit is contained in:
parent
6e67935b59
commit
8e9bd1d793
@ -44,6 +44,7 @@ class DownloadJob():
|
||||
self.mngr = mngr
|
||||
self.extractor, self.info = extractor.find(url)
|
||||
if self.extractor is None:
|
||||
print(url, ": No extractor found", sep="", file=sys.stderr)
|
||||
return
|
||||
self.directory = mngr.get_base_directory()
|
||||
self.downloaders = {}
|
||||
@ -60,7 +61,7 @@ class DownloadJob():
|
||||
def run(self):
|
||||
"""Execute/Run the download job"""
|
||||
if self.extractor is None:
|
||||
return # TODO: error msg
|
||||
return
|
||||
|
||||
for msg in self.extractor:
|
||||
if msg[0] == Message.Url:
|
||||
|
@ -41,6 +41,7 @@ def find(url):
|
||||
match = re.match(pattern, url)
|
||||
if match:
|
||||
return klass(match), module.info
|
||||
return None, None
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# internals
|
||||
|
Loading…
Reference in New Issue
Block a user