Re-implement --no-download flag
This commit is contained in:
parent
70a992d299
commit
eac2381a0a
1 changed files with 17 additions and 14 deletions
|
@ -177,6 +177,9 @@ class RedditDownloader:
|
||||||
try:
|
try:
|
||||||
downloader_class = DownloadFactory.pull_lever(submission.url)
|
downloader_class = DownloadFactory.pull_lever(submission.url)
|
||||||
downloader = downloader_class(self.download_directory, submission)
|
downloader = downloader_class(self.download_directory, submission)
|
||||||
|
if self.args.no_download:
|
||||||
|
logger.info('Skipping download for submission {}'.format(submission.id))
|
||||||
|
else:
|
||||||
content = downloader.download()
|
content = downloader.download()
|
||||||
for res in content:
|
for res in content:
|
||||||
destination = self.file_name_formatter.format_path(res, self.download_directory)
|
destination = self.file_name_formatter.format_path(res, self.download_directory)
|
||||||
|
|
Loading…
Reference in a new issue