Make S3 optional

This commit is contained in:
MMaker 2025-02-27 10:54:51 -05:00
parent aa836a4f55
commit ae803c0fe0
Signed by: mmaker
GPG Key ID: CCE79B8FEDA40FB2

4
app.py
View File

@ -46,6 +46,7 @@ s.headers.update({
})
s.cookies = cookie_jar # type: ignore
s3_client = None
if all(key in os.environ for key in [
'NICONICOGAY_S3_ACCESS_KEY',
'NICONICOGAY_S3_SECRET_KEY',
@ -60,8 +61,7 @@ if all(key in os.environ for key in [
config=BotoConfig(s3={'addressing_style': 'virtual'}),
)
else:
logger.warning("S3 credentials not provided, exiting")
exit(1)
logger.warning("S3 credentials not provided. Videos will not be downloaded.")
download_tracker = {
'active_downloads': 0,