From b9428bd9c73aa61db4bfd4529cd38fa58b743704 Mon Sep 17 00:00:00 2001 From: Xiaobing Yu Date: Fri, 6 May 2016 18:41:11 +0800 Subject: [PATCH] some url like this http://kuaibao.qq.com/s/SPO2016050503989500 got the title failed will raise exception --- src/you_get/extractors/qq.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/you_get/extractors/qq.py b/src/you_get/extractors/qq.py index 66487b8e..ebe1a9ad 100644 --- a/src/you_get/extractors/qq.py +++ b/src/you_get/extractors/qq.py @@ -32,7 +32,8 @@ def qq_download(url, output_dir='.', merge=True, info_only=False, **kwargs): elif 'kuaibao.qq.com' in url: content = get_html(url) vid = match1(content, r'vid\s*=\s*"\s*([^"]+)"') - title = match1(content, r'title">([^"]+)

').strip() + title = match1(content, r'title">([^"]+)

') + title = title.strip() if title else vid elif 'iframe/player.html' in url: vid = match1(url, r'\bvid=(\w+)') # for embedded URLs; don't know what the title is