From f8939128e6a17304aee641da2f1eb15535693dfb Mon Sep 17 00:00:00 2001 From: David Zhuang Date: Wed, 3 Aug 2016 21:39:10 -0400 Subject: [PATCH] [QQ]Add QQ Daxue --- src/you_get/extractors/qq.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/you_get/extractors/qq.py b/src/you_get/extractors/qq.py index 783bb2f5..80f8d6b7 100644 --- a/src/you_get/extractors/qq.py +++ b/src/you_get/extractors/qq.py @@ -5,6 +5,7 @@ __all__ = ['qq_download'] from ..common import * from .qie import download as qieDownload from urllib.parse import urlparse,parse_qs + def qq_download_by_vid(vid, title, output_dir='.', merge=True, info_only=False): api = "http://h5vv.video.qq.com/getinfo?otype=json&platform=10901&vid=%s" % vid content = get_html(api) @@ -23,7 +24,9 @@ def qq_download_by_vid(vid, title, output_dir='.', merge=True, info_only=False): if not info_only: download_urls([url], title, ext, size, output_dir=output_dir, merge=merge) + def qq_download(url, output_dir='.', merge=True, info_only=False, **kwargs): + """""" if 'live.qq.com' in url: qieDownload(url,output_dir=output_dir, merge=merge, info_only=info_only) return @@ -35,7 +38,7 @@ def qq_download(url, output_dir='.', merge=True, info_only=False, **kwargs): content = get_html(url) url = match1(content,r'window\.location\.href="(.*?)"') - if 'kuaibao.qq.com' in url: + if 'kuaibao.qq.com' in url or re.match(r'http://daxue.qq.com/content/content/id/\d+', url): content = get_html(url) vid = match1(content, r'vid\s*=\s*"\s*([^"]+)"') title = match1(content, r'title">([^"]+)

')