修复了url重定向问题

This commit is contained in:
ivan 2017-02-15 18:03:38 +08:00
parent 200cbba6c8
commit 2b4fe58dd9

View File

@ -223,8 +223,7 @@ def qq_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
if 'v.qq.com/page' in url: if 'v.qq.com/page' in url:
# for URLs like this: # for URLs like this:
# http://v.qq.com/page/k/9/7/k0194pwgw97.html # http://v.qq.com/page/k/9/7/k0194pwgw97.html
content = get_html(url) url = get_location(url)
url = match1(content,r'window\.location\.href="(.*?)"')
if 'kuaibao.qq.com' in url or re.match(r'http://daxue.qq.com/content/content/id/\d+', url): if 'kuaibao.qq.com' in url or re.match(r'http://daxue.qq.com/content/content/id/\d+', url):
content = get_html(url) content = get_html(url)