cloner.py 571 B

123456789101112131415161718192021
  1. #!/usr/bin/env python3
  2. # coding=utf-8
  3. import logging
  4. from bdfr.archiver import Archiver
  5. from bdfr.configuration import Configuration
  6. from bdfr.downloader import RedditDownloader
  7. logger = logging.getLogger(__name__)
  8. class RedditCloner(RedditDownloader, Archiver):
  9. def __init__(self, args: Configuration):
  10. super(RedditCloner, self).__init__(args)
  11. def download(self):
  12. for generator in self.reddit_lists:
  13. for submission in generator:
  14. self._download_submission(submission)
  15. self.write_entry(submission)