Add Streamable to download factory
This commit is contained in:
parent
2c54cd740a
commit
e6d2980db3
1 changed files with 5 additions and 1 deletions
|
@ -16,6 +16,7 @@ from bdfr.site_downloaders.redgifs import Redgifs
|
|||
from bdfr.site_downloaders.self_post import SelfPost
|
||||
from bdfr.site_downloaders.vreddit import VReddit
|
||||
from bdfr.site_downloaders.youtube import Youtube
|
||||
from bdfr.site_downloaders.streamable import Streamable
|
||||
|
||||
|
||||
class DownloadFactory:
|
||||
|
@ -42,10 +43,13 @@ class DownloadFactory:
|
|||
return VReddit
|
||||
elif re.match(r'(m\.)?youtu\.?be', sanitised_url):
|
||||
return Youtube
|
||||
elif re.match(r'streamable\.com', sanitised_url):
|
||||
return Streamable
|
||||
elif re.match(r'i\.redd\.it.*', sanitised_url):
|
||||
return Direct
|
||||
else:
|
||||
raise NotADownloadableLinkError(f'No downloader module exists for url {url}')
|
||||
raise NotADownloadableLinkError(
|
||||
f'No downloader module exists for url {url}')
|
||||
|
||||
@staticmethod
|
||||
def _sanitise_url(url: str) -> str:
|
||||
|
|
Loading…
Reference in a new issue