From 2d819526285ed95b3f883c1ed2d3cae36bd1e427 Mon Sep 17 00:00:00 2001 From: RapidStoned Date: Mon, 22 Aug 2022 17:03:00 +0200 Subject: [PATCH] Download function removed --- main.py | 3 +-- video_creation/subOverlay.py | 38 ------------------------------------ 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 video_creation/subOverlay.py diff --git a/main.py b/main.py index 5cbba63..7c476c2 100755 --- a/main.py +++ b/main.py @@ -19,7 +19,7 @@ from video_creation.background import ( get_background_config, ) -from video_creation.subOverlay import download_suboverlay + from video_creation.final_video import make_final_video from video_creation.screenshot_downloader import download_screenshots_of_reddit_posts from video_creation.voices import save_text_to_mp3 @@ -52,7 +52,6 @@ def main(POST_ID=None): download_screenshots_of_reddit_posts(reddit_object, number_of_comments) bg_config = get_background_config() download_background(bg_config) - download_suboverlay() # Check for suboverlay and download if not found! chop_background_video(bg_config, length, reddit_object) make_final_video(number_of_comments, length, reddit_object, bg_config) diff --git a/video_creation/subOverlay.py b/video_creation/subOverlay.py deleted file mode 100644 index 39d99fd..0000000 --- a/video_creation/subOverlay.py +++ /dev/null @@ -1,38 +0,0 @@ -import requests - -from os import makedirs -from os import path -from fileinput import filename -from utils.console import print_step, print_substep -from utils import settings -from pathlib import Path - -# Checks if suboverlay is a thing, if not it downloads the file -# Uses Google Drive Direct Link to store the file -def download_suboverlay(): - if settings.config["settings"]["sub_overlay"]: - URL = "https://drive.google.com/u/0/uc?id=16ajH0maciiWgWNgA-PNh29GZe9xqZmZR&export=download" - fileName = "youtube" - - if settings.config["settings"]["sub_overlay_name"] == "tiktok": - URL = "https://drive.google.com/u/0/uc?id=1N7tmEacL5GSUpVukxwza7OL7ihfAdShq&export=download" - fileName = "tiktok" - - if settings.config["settings"]["sub_overlay_name"] == "instagram": - URL = "https://drive.google.com/u/0/uc?id=19Yvuuojba8ixIP8whs0QEqw9gTer4T20&export=download" - fileName = "instagram" - - if Path(f"assets/subOverlay/{fileName}.mov").is_file(): - return - - #Generate path and folders - if not path.isdir(f'assets/subOverlay'): - makedirs(f'assets/subOverlay') - - print_step("We need to download the subscribe overlay, this only needs to be done once!") - print_substep("Downloading subscribe overlay please wait....") - - subOverlayFile = requests.get(URL, verify=False) - open(f'assets/subOverlay/{fileName}.mov', 'wb').write(subOverlayFile.content) - - print_substep("Subscribe overlay has been downloaded!", style="bold green")