diff options
Diffstat (limited to 'module/plugins/hoster/BitshareCom.py')
-rw-r--r-- | module/plugins/hoster/BitshareCom.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index f7b4d2709..5c709e4f7 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -4,16 +4,17 @@ from __future__ import with_statement import re -from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.ReCaptcha import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class BitshareCom(SimpleHoster): __name__ = "BitshareCom" __type__ = "hoster" - __version__ = "0.52" + __version__ = "0.54" __pattern__ = r'http://(?:www\.)?bitshare\.com/(files/)?(?(1)|\?f=)(?P<ID>\w+)(?(1)/(?P<NAME>.+?)\.html)' + __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Bitshare.com hoster plugin""" __license__ = "GPLv3" @@ -71,7 +72,7 @@ class BitshareCom(SimpleHoster): self.logDebug("File ajax id is [%s]" % self.ajaxid) # This may either download our file or forward us to an error page - self.download(self.getDownloadUrl()) + self.link = self.getDownloadUrl() if self.checkDownload({"error": ">Error occured<"}): self.retry(5, 5 * 60, "Bitshare host : Error occured") @@ -80,7 +81,7 @@ class BitshareCom(SimpleHoster): def getDownloadUrl(self): # Return location if direct download is active if self.premium: - header = self.load(self.pyfile.url, cookies=True, just_header=True) + header = self.load(self.pyfile.url, just_header=True) if 'location' in header: return header['location'] @@ -114,7 +115,7 @@ class BitshareCom(SimpleHoster): # Try up to 3 times for i in xrange(3): - challenge, response = recaptcha.challenge() + response, challenge = recaptcha.challenge() res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html", post={"request" : "validateCaptcha", "ajaxid" : self.ajaxid, |