1
0
Fork 0
mirror of synced 2024-06-21 11:40:21 +12:00

Add Streamable downloader

This commit is contained in:
Daniel Clowry 2021-04-29 19:05:16 +10:00 committed by Serene
parent 39935c58d9
commit 2c54cd740a

View file

@ -0,0 +1,21 @@
#!/usr/bin/env python3
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.youtube import Youtube
logger = logging.getLogger(__name__)
class Streamable(Youtube):
def __init__(self, post: Submission):
super().__init__(post)
def find_resources(self, authenticator: Optional[SiteAuthenticator] = None) -> list[Resource]:
out = super()._download_video({})
return [out]