summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/BitshareCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-05 01:55:44 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-05 02:27:38 +0200
commitdf10dce103716acc293f51572650b3dbb7264bf2 (patch)
treeb4523f52f57ff81672a8bb7395c98784cb515c26 /module/plugins/hoster/BitshareCom.py
parentUse load instead req.load in all crypters and CaptchaService (diff)
downloadpyload-df10dce103716acc293f51572650b3dbb7264bf2.tar.xz
Spare code fixes about COOKIES
Diffstat (limited to 'module/plugins/hoster/BitshareCom.py')
-rw-r--r--module/plugins/hoster/BitshareCom.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py
index d7143952b..86bc22860 100644
--- a/module/plugins/hoster/BitshareCom.py
+++ b/module/plugins/hoster/BitshareCom.py
@@ -22,15 +22,17 @@ class BitshareCom(SimpleHoster):
FILE_INFO_PATTERN = r'Downloading (?P<N>.+) - (?P<S>[\d.]+) (?P<U>\w+)</h1>'
OFFLINE_PATTERN = r'(>We are sorry, but the requested file was not found in our database|>Error - File not available<|The file was deleted either by the uploader, inactivity or due to copyright claim)'
+ COOKIES = [(".bitshare.com", "language_selection", "EN")]
+
FILE_AJAXID_PATTERN = r'var ajaxdl = "(.*?)";'
TRAFFIC_USED_UP = r'Your Traffic is used up for today. Upgrade to premium to continue!'
def setup(self):
- self.req.cj.setCookie(".bitshare.com", "language_selection", "EN")
self.multiDL = self.premium
self.chunkLimit = 1
+
def process(self, pyfile):
if self.premium:
self.account.relogin(self.user)
@@ -77,6 +79,7 @@ class BitshareCom(SimpleHoster):
elif check == "error":
self.retry(5, 5 * 60, "Bitshare host : Error occured")
+
def getDownloadUrl(self):
# Return location if direct download is active
if self.premium:
@@ -131,6 +134,7 @@ class BitshareCom(SimpleHoster):
return url
+
def handleErrors(self, response, separator):
self.logDebug("Checking response [%s]" % response)
if "ERROR:Session timed out" in response:
@@ -139,6 +143,7 @@ class BitshareCom(SimpleHoster):
msg = response.split(separator)[-1]
self.fail(msg)
+
def handleCaptchaErrors(self, response):
self.logDebug("Result of captcha resolving [%s]" % response)
if "SUCCESS" in response: