|
@@ -16,6 +16,8 @@
|
|
|
|
|
|
# -*- coding: utf8 -*-
|
|
|
|
|
|
+from __future__ import unicode_literals
|
|
|
+
|
|
|
import subprocess
|
|
|
import sys
|
|
|
import lxml.html
|
|
@@ -98,9 +100,9 @@ class Connector(object):
|
|
|
except subprocess.CalledProcessError:
|
|
|
raise stov_exceptions.YoutubeDlCallFailed()
|
|
|
else:
|
|
|
- videos_list.append(youtubeAPI.YtVideo(video_title,
|
|
|
- video_description,
|
|
|
- video_id))
|
|
|
+ videos_list.append(youtubeAPI.YtVideo(unicode(video_title, "utf-8"),
|
|
|
+ unicode(video_description, "utf-8"),
|
|
|
+ unicode(video_id)))
|
|
|
return videos_list
|
|
|
|
|
|
def ParseAPIData(self):
|
|
@@ -112,6 +114,6 @@ class Connector(object):
|
|
|
self._fetch_title()
|
|
|
videos = self._fetch_videos()
|
|
|
channel = youtubeAPI.YtChannel()
|
|
|
- channel.title = self._title
|
|
|
+ channel.title = unicode(self._title)
|
|
|
channel.videos = videos
|
|
|
return channel
|