From 644260c836626700b20d38b5183e49b5dbbaa54c Mon Sep 17 00:00:00 2001 From: Juan Olvera Date: Mon, 5 Jun 2023 11:34:55 -0500 Subject: [PATCH] fix kwarg type --- yt_dlp_stream_to_s3/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yt_dlp_stream_to_s3/main.py b/yt_dlp_stream_to_s3/main.py index e93465f..3ad5b9a 100644 --- a/yt_dlp_stream_to_s3/main.py +++ b/yt_dlp_stream_to_s3/main.py @@ -12,7 +12,7 @@ from yt_dlp_stream_to_s3.errors import YtDlpStreamToS3Error def yt_dlp_stream_to_s3( url: str, expiration=86400 * 7, # 7 days - s3_extra_args: dict = (), + s3_extra_args=dict(), ) -> Dict[str, str]: media_url = remove_queries_from_url(url) @@ -53,12 +53,14 @@ def yt_dlp_stream_to_s3( yt_dlp_process.wait() - return dict( + response = dict( presigned_url=create_presigned_url( AWS_S3_BUCKET_NAME, filename, expiration ), filesize=get_file_size(AWS_S3_BUCKET_NAME, filename), ) + + return response except HTTPError: raise YtDlpStreamToS3Error("Could not connect to the media resource.")