From 89b5c8b0e8bb8190109503f9e136d43033e73221 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Sun, 29 Jul 2012 15:51:29 +0200 Subject: [PATCH] cappedtv: Fix some warnings --- modules/cappedtv/browser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/cappedtv/browser.py b/modules/cappedtv/browser.py index 7443c084..cab1baed 100644 --- a/modules/cappedtv/browser.py +++ b/modules/cappedtv/browser.py @@ -29,7 +29,7 @@ class CappedVideo(BaseVideo): def __init__(self, *args, **kwargs): BaseVideo.__init__(self, *args, **kwargs) self.nsfw = False - self.ext = 'mp4' + self.ext = u'mp4' @classmethod def id2url(cls, _id): @@ -53,8 +53,8 @@ class IndexPage(BasePage): video = CappedVideo(_id) video.set_empty_fields(NotAvailable, ('url',)) - video.title = self.parser.select(vidbackdrop, 'div.vidTitle a', 1).text - video.author = self.parser.select(vidbackdrop, 'div.vidAuthor a', 1).text + video.title = to_unicode(self.parser.select(vidbackdrop, 'div.vidTitle a', 1).text) + video.author = to_unicode(self.parser.select(vidbackdrop, 'div.vidAuthor a', 1).text) thumbnail_url = 'http://cdn.capped.tv/pre/%s.png' % _id video.thumbnail = Thumbnail(thumbnail_url) @@ -95,7 +95,7 @@ class VideoPage(BasePage): video.title = to_unicode(title_tmp.text.strip()) # Videopages doesn't have duration information (only results pages) - video.url = 'http://cdn.capped.tv/vhq/%s.mp4' % _id + video.url = u'http://cdn.capped.tv/vhq/%s.mp4' % _id return video