add --write-unsupported option (#15)

This commit is contained in:
Mike Fährmann
2017-05-27 16:16:57 +02:00
parent bf452a8516
commit 25bcdc8aa9
3 changed files with 22 additions and 12 deletions

View File

@@ -100,8 +100,14 @@ def main():
file = open(args.inputfile)
import itertools
urls = itertools.chain(urls, sanatize_input(file))
except OSError as err:
log.error(err)
except OSError as exc:
log.warning("input-file: %s", exc)
if args.unsupportedfile:
try:
job.Job.ufile = open(args.unsupportedfile, "w")
except OSError as exc:
log.warning("unsupported-URL file: %s", exc)
for url in urls:
try: