Refactored for easier merging and fixed dependencies.

pull/157/head
Lewis Menelaws 3 years ago
parent b05ac18476
commit 45e3a11440

@ -1,6 +1,6 @@
from utils.console import print_markdown
import time
from reddit.askreddit import get_askreddit_threads
from reddit.subreddit import get_askreddit_threads
from video_creation.background import download_background, chop_background_video
from video_creation.voices import save_text_to_mp3
from video_creation.screenshot_downloader import download_screenshots_of_reddit_posts

@ -13,13 +13,15 @@ def get_askreddit_threads():
load_dotenv()
print_step("Getting AskReddit threads...")
if os.getenv("REDDIT_2FA") == "yes" or "YES":
print("\nEnter your two-factor authentication code from your authenticator app.\n")
print(os.getenv("REDDIT_2FA"))
if os.getenv("REDDIT_2FA").lower() == "yes":
print(
"\nEnter your two-factor authentication code from your authenticator app.\n"
)
code = input("> ")
print()
pw = os.getenv("REDDIT_PASSWORD")
passkey = f'{pw}:{code}'
passkey = f"{pw}:{code}"
else:
passkey = os.getenv("REDDIT_PASSWORD")

@ -15,7 +15,7 @@ mccabe==0.6.1
moviepy==1.0.3
mutagen==1.45.1
mypy-extensions==0.4.3
numpy==1.15.1
numpy==1.22.3
pathspec==0.8.0
Pillow==9.1.1
playwright==1.22.0

@ -25,8 +25,8 @@ def download_background():
print_substep("Downloading the background video... please be patient.")
ydl_opts = {
'outtmpl': 'assets/mp4/background',
'merge_output_format': 'mp4',
"outtmpl": "assets/mp4/background.mp4",
"merge_output_format": "mp4",
}
with YoutubeDL(ydl_opts) as ydl:

Loading…
Cancel
Save