From a61ba6b8f45d94bf8e89a9f351c5c6cac2379387 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sat, 16 Feb 2019 15:21:39 -0800 Subject: playlist: fix error when there's no description --- youtube/playlist.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'youtube/playlist.py') diff --git a/youtube/playlist.py b/youtube/playlist.py index cc0da33..419ed00 100644 --- a/youtube/playlist.py +++ b/youtube/playlist.py @@ -2,13 +2,14 @@ import base64 import youtube.common as common import urllib import json -from string import Template +import string +from youtube import template import youtube.proto as proto import gevent import math with open("yt_playlist_template.html", "r") as file: - yt_playlist_template = Template(file.read()) + yt_playlist_template = template.Template(file.read()) @@ -76,7 +77,7 @@ def get_videos(playlist_id, page): return info -playlist_stat_template = Template(''' +playlist_stat_template = string.Template('''
$stat
''') def get_playlist_page(env, start_response): start_response('200 OK', [('Content-type','text/html'),]) -- cgit v1.2.3