Browse Source

also convert video title and description to string

Helmut Pozimski 9 years ago
parent
commit
b931bc00b1
2 changed files with 11 additions and 2 deletions
  1. 6 0
      debian/changelog
  2. 5 2
      lib_stov/noapi.py

+ 6 - 0
debian/changelog

@@ -1,3 +1,9 @@
+stov (0.9.3~beta2-1) unstable; urgency=low
+
+  * New upstream beta release
+
+ -- Helmut Pozimski <helmut@pozimski.eu>  Thu, 14 May 2015 17:55:00 +0200
+
 stov (0.9.3~beta1-1) unstable; urgency=low
 
   * New upstream beta release

+ 5 - 2
lib_stov/noapi.py

@@ -126,15 +126,18 @@ class Connector(object):
                         video_title = subprocess.check_output([
                             self._conf.values["youtube-dl"], "--get-title",
                             "https://www.youtube.com/watch?v=%s"
-                            % video_id], stderr=stderr).strip()
+                            % video_id], stderr=stderr)
                         video_description = subprocess.check_output([
                             self._conf.values["youtube-dl"],
                             "--get-description",
                             "https://www.youtube.com/watch?v=%s"
-                            % video_id], stderr=stderr).strip()
+                            % video_id], stderr=stderr)
                     except subprocess.CalledProcessError:
                         raise stov_exceptions.YoutubeDlCallFailed()
                     else:
+                        video_title = video_title.decode(sys.stdout.encoding)
+                        video_description = video_description.decode(
+                            sys.stdout.encoding)
                         videos_list.append(YtVideo(
                             video_title,
                             video_description,