1
0
Fork 0
mirror of synced 2024-09-28 07:12:07 +12:00

Re-implement --no-download flag

This commit is contained in:
Serene-Arc 2021-02-14 19:09:18 +10:00 committed by Ali Parlakci
parent 70a992d299
commit eac2381a0a

View file

@ -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)