diff options
author | gabrielgio <gabriel.giovanini@pm.me> | 2021-07-27 23:15:53 +0200 |
---|---|---|
committer | gabrielgio <gabriel.giovanini@pm.me> | 2021-07-27 23:28:51 +0200 |
commit | b8d69f9bf5a03fd6d8b6a477f3b7ca8f10c27bda (patch) | |
tree | 6652fd8b3e89b652791167e73b293b57d0b6496b /importer/downloader.py | |
parent | 3d54b3d91d0c175feae82c413fd0139545d46e2a (diff) | |
download | reddit-nextcloud-importer-b8d69f9bf5a03fd6d8b6a477f3b7ca8f10c27bda.tar.gz reddit-nextcloud-importer-b8d69f9bf5a03fd6d8b6a477f3b7ca8f10c27bda.tar.bz2 reddit-nextcloud-importer-b8d69f9bf5a03fd6d8b6a477f3b7ca8f10c27bda.zip |
feat: Move to gallery-dl
As it turns out there is already a project that does what I want but
better.
Diffstat (limited to 'importer/downloader.py')
-rw-r--r-- | importer/downloader.py | 19 |
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) |