cappedtv: Fix some warnings
This commit is contained in:
parent
af82a0d292
commit
89b5c8b0e8
1 changed files with 4 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ class CappedVideo(BaseVideo):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
BaseVideo.__init__(self, *args, **kwargs)
|
BaseVideo.__init__(self, *args, **kwargs)
|
||||||
self.nsfw = False
|
self.nsfw = False
|
||||||
self.ext = 'mp4'
|
self.ext = u'mp4'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def id2url(cls, _id):
|
def id2url(cls, _id):
|
||||||
|
|
@ -53,8 +53,8 @@ class IndexPage(BasePage):
|
||||||
video = CappedVideo(_id)
|
video = CappedVideo(_id)
|
||||||
video.set_empty_fields(NotAvailable, ('url',))
|
video.set_empty_fields(NotAvailable, ('url',))
|
||||||
|
|
||||||
video.title = self.parser.select(vidbackdrop, 'div.vidTitle a', 1).text
|
video.title = to_unicode(self.parser.select(vidbackdrop, 'div.vidTitle a', 1).text)
|
||||||
video.author = self.parser.select(vidbackdrop, 'div.vidAuthor 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
|
thumbnail_url = 'http://cdn.capped.tv/pre/%s.png' % _id
|
||||||
video.thumbnail = Thumbnail(thumbnail_url)
|
video.thumbnail = Thumbnail(thumbnail_url)
|
||||||
|
|
@ -95,7 +95,7 @@ class VideoPage(BasePage):
|
||||||
video.title = to_unicode(title_tmp.text.strip())
|
video.title = to_unicode(title_tmp.text.strip())
|
||||||
|
|
||||||
# Videopages doesn't have duration information (only results pages)
|
# 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
|
return video
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue