about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2014-09-14 05:01:25 +0700
committerSergey M․ <dstftw@gmail.com>2014-09-14 05:01:25 +0700
commit5dbf3b5c60e99585697cea95a34aa8fd6c109827 (patch)
tree3edc9a5a6bbb60511197438906ee92483225ee07
parentb8d61935a0f42ae40e57e059214ffa50044d9158 (diff)
downloadyoutube-dl-5dbf3b5c60e99585697cea95a34aa8fd6c109827.tar.gz
youtube-dl-5dbf3b5c60e99585697cea95a34aa8fd6c109827.tar.xz
youtube-dl-5dbf3b5c60e99585697cea95a34aa8fd6c109827.zip
[cloudy] Minor changes
-rw-r--r--youtube_dl/extractor/cloudy.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/youtube_dl/extractor/cloudy.py b/youtube_dl/extractor/cloudy.py
index 73c6e3d49..95eda2e58 100644
--- a/youtube_dl/extractor/cloudy.py
+++ b/youtube_dl/extractor/cloudy.py
@@ -8,6 +8,7 @@ from ..utils import (
     ExtractorError,
     compat_parse_qs,
     compat_urllib_parse,
+    remove_end,
 )
 
 
@@ -52,13 +53,15 @@ class CloudyIE(InfoExtractor):
 
         title = data.get('title', [None])[0]
         if title:
-            title = title.replace('&asdasdas', '').strip()
+            title = remove_end(title, '&asdasdas').strip()
 
         formats = []
-        formats.append({
-            'format_id': 'sd',
-            'url': data.get('url', [None])[0],
-        })
+        video_url = data.get('url', [None])[0]
+        if video_url:
+            formats.append({
+                'format_id': 'sd',
+                'url': video_url,
+            })
 
         return {
             'id': video_id,