summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-08-18 23:12:07 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-08-18 23:12:07 +0200
commit8638a9f8cfadd8591a8cefc06a543d61b3cc4054 (patch)
tree4f59c4700d628e75023672cee93e7bff171d430f /module
parentMerge pull request #1755 from estaban/patch-6 (diff)
parentUpdate ShareLinksBiz.py (diff)
downloadpyload-8638a9f8cfadd8591a8cefc06a543d61b3cc4054.tar.xz
Merge pull request #1754 from joberreiter/patch-3
[SharelinksBiz & FilecryptCc] Fixes #1753
Diffstat (limited to 'module')
-rw-r--r--module/plugins/crypter/FilecryptCc.py7
-rw-r--r--module/plugins/crypter/ShareLinksBiz.py15
2 files changed, 15 insertions, 7 deletions
diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py
index 9f4ad69aa..ac78e9aa8 100644
--- a/module/plugins/crypter/FilecryptCc.py
+++ b/module/plugins/crypter/FilecryptCc.py
@@ -16,7 +16,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha
class FilecryptCc(Crypter):
__name__ = "FilecryptCc"
__type__ = "crypter"
- __version__ = "0.18"
+ __version__ = "0.19"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+'
@@ -140,8 +140,9 @@ class FilecryptCc(Crypter):
for link in weblinks:
res = self.load("%s/Link/%s.html" % (self.base_url, link))
link2 = re.search('<iframe noresize src="(.*)"></iframe>', res)
- res2 = self.load(link2.group(1), just_header=True)
- self.links.append(res2['location'])
+ if link2:
+ res2 = self.load(link2.group(1), just_header=True)
+ self.links.append(res2['location'])
except Exception, e:
self.log_debug("Error decrypting weblinks: %s" % e)
diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py
index 6fbe59b38..712b4fff2 100644
--- a/module/plugins/crypter/ShareLinksBiz.py
+++ b/module/plugins/crypter/ShareLinksBiz.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Crypter import Crypter
class ShareLinksBiz(Crypter):
__name__ = "ShareLinksBiz"
__type__ = "crypter"
- __version__ = "1.16"
+ __version__ = "1.17"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P<ID>_?\w+)'
@@ -68,8 +68,12 @@ class ShareLinksBiz(Crypter):
url = pyfile.url
if 's2l.biz' in url:
url = self.load(url, just_header=True)['location']
- self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1)
- self.file_id = re.match(self.__pattern__, url).group('ID')
+ if re.match(self.__pattern__, url):
+ self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1)
+ self.file_id = re.match(self.__pattern__, url).group('ID')
+ else:
+ self.log_debug("Could not initialize, URL [%s] does not match pattern [%s]" % (url, self.__pattern__))
+ self.fail("Unsupported download link")
self.package = pyfile.package()
@@ -114,7 +118,10 @@ class ShareLinksBiz(Crypter):
self.log_debug("Captcha map with [%d] positions" % len(captchaMap.keys()))
#: Request user for captcha coords
- m = re.search(r'<img src="/captcha.gif\?d=(.*?)&amp;PHPSESSID=(.*?)&amp;legend=1"', self.html)
+ m = re.search(r'<img src="/captcha.gif\?d=(.+?)&PHPSESSID=(.+?)&legend=1"', self.html)
+ if not m:
+ self.log_debug("Captcha url data not found, maybe plugin out of date?")
+ self.fail("Captcha url data not found")
captchaUrl = self.base_url + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2))
self.log_debug("Waiting user for correct position")
coords = self.captcha.decrypt(captchaUrl, input_type="gif", output_type='positional')