1
0
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:
Mike Fährmann 2015-11-06 13:21:53 +01:00
parent 6e67935b59
commit 8e9bd1d793
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 3 additions and 1 deletions

View File

@ -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:

View File

@ -41,6 +41,7 @@ def find(url):
match = re.match(pattern, url)
if match:
return klass(match), module.info
return None, None
# --------------------------------------------------------------------
# internals