[kuwo:category] Fix description and update test
authorYen Chi Hsuan <yan12125@gmail.com>
Tue, 3 May 2016 08:06:28 +0000 (16:06 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Tue, 3 May 2016 08:06:28 +0000 (16:06 +0800)
youtube_dl/extractor/kuwo.py

index 3740869c74cdc9ae878f5012c398a9bde7e7356b..616ed19e124ed72b8312d6a04120af8e20fa60e4 100644 (file)
@@ -266,7 +266,6 @@ class KuwoCategoryIE(InfoExtractor):
         'info_dict': {
             'id': '86375',
             'title': '八十年代精选',
-            'description': '这些都是属于八十年代的回忆!',
         },
         'playlist_mincount': 24,
     }
@@ -283,6 +282,8 @@ class KuwoCategoryIE(InfoExtractor):
         category_desc = remove_start(
             get_element_by_id('intro', webpage).strip(),
             '%s简介:' % category_name)
+        if category_desc == '暂无':
+            category_desc = None
 
         jsonm = self._parse_json(self._html_search_regex(
             r'var\s+jsonm\s*=\s*([^;]+);', webpage, 'category songs'), category_id)