83f45e7f60
Standardizes shebang and coding declarations. Coding matches what's used by install tools such as pip(x). Removes a few init files that were not needed.
22 lines
676 B
Python
22 lines
676 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import logging
|
|
from typing import Optional
|
|
|
|
from praw.models import Submission
|
|
|
|
from bdfr.resource import Resource
|
|
from bdfr.site_authenticator import SiteAuthenticator
|
|
from bdfr.site_downloaders.base_downloader import BaseDownloader
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class DelayForReddit(BaseDownloader):
|
|
def __init__(self, post: Submission):
|
|
super().__init__(post)
|
|
|
|
def find_resources(self, authenticator: Optional[SiteAuthenticator] = None) -> list[Resource]:
|
|
media = DelayForReddit.retrieve_url(self.post.url)
|
|
return [Resource(self.post, media.url, Resource.retry_download(media.url))]
|