add authentication-exception

This commit is contained in:
Mike Fährmann
2016-07-14 14:57:42 +02:00
parent 6f7f29d684
commit d6c06f9efd
3 changed files with 15 additions and 7 deletions

View File

@@ -87,6 +87,12 @@ def main():
else:
jobtype = job.DownloadJob
for url in args.urls:
jobtype(url).run()
try:
jobtype(url).run()
except exception.NoExtractorError:
print("No suitable extractor found for URL '", url, "'", sep="")
except exception.AuthenticationError:
print("Authentication failed. Please provide a valid "
"username/password pair.")
except KeyboardInterrupt:
print("\nKeyboardInterrupt")