From 49eec71f0597fab38a53296558bb1be268815bb8 Mon Sep 17 00:00:00 2001 From: CordlessCoder Date: Tue, 5 Jul 2022 23:51:49 +0300 Subject: [PATCH] refactor: utils/videos.py uses new toml config(fix) --- utils/videos.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/videos.py b/utils/videos.py index 4e248b9..6377256 100755 --- a/utils/videos.py +++ b/utils/videos.py @@ -1,5 +1,4 @@ import json -import os import time from typing import Dict @@ -51,7 +50,9 @@ def save_data(filename: str, reddit_title: str, reddit_id: str): payload = { "id": reddit_id, "time": str(int(time.time())), - "background_credit": str(os.getenv("background_credit")), + "background_credit": settings.config["settings"]["background_credit"] + if "background_credit" in settings.config["settings"] + else "", "reddit_title": reddit_title, "filename": filename, }