From 8cad77ad0d7e0a0d07629087e2ee1709688cb58d Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 19 Jul 2019 22:27:10 -0700 Subject: Convert comments to flask framework --- youtube/watch.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'youtube/watch.py') diff --git a/youtube/watch.py b/youtube/watch.py index 1972cb4..dc50b7b 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -153,7 +153,7 @@ def get_watch_page(): gevent.spawn(extract_info, yt_dl_downloader, "https://www.youtube.com/watch?v=" + video_id, download=False) ) gevent.joinall(tasks) - comments_html, info = tasks[0].value, tasks[1].value + comments_info, info = tasks[0].value, tasks[1].value if isinstance(info, str): # youtube error return flask.render_template('error.html', error_message = info) @@ -207,9 +207,7 @@ def get_watch_page(): related = related_videos, music_list = info['music_list'], music_attributes = get_ordered_music_list_attributes(info['music_list']), - - # TODO: refactor these - comments = comments_html, + comments_info = comments_info, title = info['title'], uploader = info['uploader'], -- cgit v1.2.3