From c6eeb21e2b0f35afeeb362a16e656ba4f489cc2e Mon Sep 17 00:00:00 2001 From: Kai Yuan Date: Fri, 29 Jun 2018 22:46:46 +0200 Subject: [PATCH] [#60] xiami cut the "http:" off from dl-link --- zhuaxia/xiami.py | 6 +++++- zhuaxia/zxver.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zhuaxia/xiami.py b/zhuaxia/xiami.py index eabb9b2..4bcc723 100644 --- a/zhuaxia/xiami.py +++ b/zhuaxia/xiami.py @@ -455,7 +455,11 @@ def decode_xiami_link(self,mess): for i in xrange(len_url): durl += l[i%rows][i/rows] - return urllib.unquote(durl).replace('^', '0') + durl = urllib.unquote(durl).replace('^', '0') + + #if it is not started by 'http:', add the protocol + durl = ("" if durl.startswith('http:') else 'http:') + durl + return durl def get_real_id(self,url, regex): """ diff --git a/zhuaxia/zxver.py b/zhuaxia/zxver.py index 9384aaf..a441c45 100644 --- a/zhuaxia/zxver.py +++ b/zhuaxia/zxver.py @@ -1 +1 @@ -version='3.2.5' +version='3.2.6'