Add Streamable downloader
This commit is contained in:
parent
39935c58d9
commit
2c54cd740a
21
bdfr/site_downloaders/streamable.py
Normal file
21
bdfr/site_downloaders/streamable.py
Normal 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]
|
Loading…
Reference in a new issue