add 'download' option (#220)
This commit is contained in:
@@ -307,7 +307,10 @@ class DownloadJob(Job):
|
||||
self.pathfmt = util.PathFormat(self.extractor)
|
||||
if keywords:
|
||||
self.pathfmt.set_directory(keywords)
|
||||
|
||||
self.sleep = self.extractor.config("sleep")
|
||||
if not self.extractor.config("download", True):
|
||||
self.download = lambda x: True
|
||||
|
||||
skip = self.extractor.config("skip", True)
|
||||
if skip:
|
||||
|
||||
@@ -205,6 +205,11 @@ def build_parser():
|
||||
help=("Do not set file modification times according to "
|
||||
"Last-Modified HTTP response headers")
|
||||
)
|
||||
downloader.add_argument(
|
||||
"--no-download",
|
||||
dest="download", nargs=0, action=ConfigConstAction, const=False,
|
||||
help=("Do not download any files")
|
||||
)
|
||||
downloader.add_argument(
|
||||
"--no-check-certificate",
|
||||
dest="verify", nargs=0, action=ConfigConstAction, const=False,
|
||||
|
||||
Reference in New Issue
Block a user