From 8e22c1508f094ee68cb0c30edb773f0ebeacf82b Mon Sep 17 00:00:00 2001 From: banbanchs Date: Sat, 22 Mar 2014 17:35:40 +0800 Subject: [PATCH] Fixes #5 :wap support --- bddown_core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bddown_core.py b/bddown_core.py index 4ad5d95..6134e63 100644 --- a/bddown_core.py +++ b/bddown_core.py @@ -176,8 +176,10 @@ def download(args): if namespace.output_dir: output_dir = namespace.output_dir - links = filter(check_url, links) # filter the wrong url - links = map(add_http, links) # add 'http://' + # if is wap + links = [link.replace("wap/link", "share/link") for link in links] + links = filter(check_url, links) # filter the wrong url + links = map(add_http, links) # add 'http://' for url in links: pan = BaiduDown(url, secret=secret) filename = pan.filename