aboutsummaryrefslogtreecommitdiff
path: root/importer/downloader.py
diff options
context:
space:
mode:
Diffstat (limited to 'importer/downloader.py')
-rw-r--r--importer/downloader.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/importer/downloader.py b/importer/downloader.py
deleted file mode 100644
index 290c9e2..0000000
--- a/importer/downloader.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import re
-
-from praw import Reddit
-
-from importer.providers import GReddit, Gfycat, IReddit, Imgur, RedGifs, VReddit, YoutubeDlProviderBase, \
- RawImageProviderBase, Youtube
-
-
-class Downloader:
- providers = [GReddit, Gfycat, IReddit, Imgur, RedGifs, VReddit, Youtube, RawImageProviderBase,
- YoutubeDlProviderBase]
-
- def __init__(self, url: str, reddit: Reddit):
- self.Provider = next(filter(lambda x: re.match(x.regex, url), self.providers))
- self.url = url
- self.reddit = reddit
-
- def provider(self):
- return self.Provider(url=self.url, reddit=self.reddit)