Re-implement --no-download flag

This commit is contained in:
Serene-Arc authored and Ali Parlakci committed 2021-04-18 16:43:55 +03:00
1 parent 70a992d299
commit eac2381a0a
1 file changed
+3
+3
View File
@@ -177,6 +177,9 @@ class RedditDownloader:
try:
downloader_class = DownloadFactory.pull_lever(submission.url)
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()
for res in content:
destination = self.file_name_formatter.format_path(res, self.download_directory)