diff --git a/frontends/ycdl_flask/ycdl_flask/ycdl_flask.py b/frontends/ycdl_flask/ycdl_flask/ycdl_flask.py index 619bc31..080c4cd 100644 --- a/frontends/ycdl_flask/ycdl_flask/ycdl_flask.py +++ b/frontends/ycdl_flask/ycdl_flask/ycdl_flask.py @@ -26,7 +26,7 @@ TEMPLATE_DIR = root_dir.with_child('templates') STATIC_DIR = root_dir.with_child('static') FAVICON_PATH = STATIC_DIR.with_child('favicon.png') -youtube_core = ycdl.ytapi.Youtube(bot.YOUTUBE_KEY) +youtube_core = ycdl.ytapi.Youtube(bot.get_youtube_key()) youtube = ycdl.YCDL(youtube_core) site = flask.Flask( diff --git a/frontends/ycdl_repl.py b/frontends/ycdl_repl.py index ff6e021..14735bf 100644 --- a/frontends/ycdl_repl.py +++ b/frontends/ycdl_repl.py @@ -6,5 +6,5 @@ session with these variables preloaded. import bot import ycdl -youtube_core = ycdl.ytapi.Youtube(bot.YOUTUBE_KEY) -youtube = ycdl.YCDL(youtube_core) +youtube = ycdl.ytapi.Youtube(bot.get_youtube_key()) +ydl = ycdl.YCDL(youtube) diff --git a/utilities/download_thumbnails.py b/utilities/download_thumbnails.py index a561564..60c7d4c 100644 --- a/utilities/download_thumbnails.py +++ b/utilities/download_thumbnails.py @@ -9,12 +9,12 @@ import ycdl_repl from voussoirkit import downloady -youtube_core = ycdl.ytapi.Youtube(bot.YOUTUBE_KEY) +youtube_core = ycdl.ytapi.Youtube(bot.get_youtube_key()) youtube = ycdl.YCDL(youtube_core) DIRECTORY = '.\\youtube thumbnails' -videos = ycdl_repl.youtube.get_videos() +videos = ycdl_repl.ydl.get_videos() for video in videos: try: thumbnail_path = os.path.join(DIRECTORY, video['id']) + '.jpg'