aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-02-16 15:21:39 -0800
committerJames Taylor <user234683@users.noreply.github.com>2019-02-16 15:21:39 -0800
commita61ba6b8f45d94bf8e89a9f351c5c6cac2379387 (patch)
tree2174fafa3788baa8f9808f7577b1dfe11305b72a
parent74658f184bc9d7c6cc17ff092eb26a14ffe6213c (diff)
downloadyt-local-a61ba6b8f45d94bf8e89a9f351c5c6cac2379387.tar.lz
yt-local-a61ba6b8f45d94bf8e89a9f351c5c6cac2379387.tar.xz
yt-local-a61ba6b8f45d94bf8e89a9f351c5c6cac2379387.zip
playlist: fix error when there's no description
-rw-r--r--youtube/playlist.py7
1 files changed, 4 insertions, 3 deletions
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('''
<div>$stat</div>''')
def get_playlist_page(env, start_response):
start_response('200 OK', [('Content-type','text/html'),])