diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-08-31 15:30:33 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-08-31 15:30:33 +0200 |
commit | a321e0d4ab22373933c7d9c0a0d26996889004a5 (patch) | |
tree | db57afef8689aac95f62c76fd6c0124bad304456 /module/plugins/hoster/FileserveCom.py | |
parent | added confirmation dialog before deleting a package (diff) | |
download | pyload-a321e0d4ab22373933c7d9c0a0d26996889004a5.tar.xz |
Diffstat (limited to 'module/plugins/hoster/FileserveCom.py')
-rw-r--r-- | module/plugins/hoster/FileserveCom.py | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 4654e4a7e..53a970226 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -2,6 +2,7 @@ from __future__ import with_statement
import re
+from base64 import standard_b64encode
from module.plugins.Hoster import Hoster
from module.plugins.ReCaptcha import ReCaptcha
@@ -34,7 +35,7 @@ class FileserveCom(Hoster): __name__ = "FileserveCom"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?fileserve\.com/file/[a-zA-Z0-9]+"
- __version__ = "0.41"
+ __version__ = "0.42"
__description__ = """Fileserve.Com File Download Hoster"""
__author_name__ = ("jeix", "mkaay", "paul king")
__author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de", "")
@@ -80,17 +81,8 @@ class FileserveCom(Hoster): def handlePremium(self):
-
- ret = self.account.loginApi(self.user, self.req)
- ret = self.account.getShorten(self.req, ret["token"].strip("\x00"), self.file_id)
-
- #110 offline
- if ret["result_code"] == "110":
- self.offline()
-
- data = self.account.getDirectLink(self.req, ret["token"].strip("\x00"))
-
- self.download(data['result_string'])
+ # handle login timeouts
+ self.download(self.pyfile.url)
def handleFree(self):
self.html = self.load(self.pyfile.url)
@@ -136,7 +128,8 @@ class FileserveCom(Hoster): self.download(self.pyfile.url, post={"download": "normal"})
check = self.checkDownload({"expired": "Your download link has expired",
- "wait": re.compile(self.LONG_WAIT_PATTERN)})
+ "wait": re.compile(self.LONG_WAIT_PATTERN),
+ "limit": "Your daily download limit has been reached"})
if check == "expired":
self.logDebug("Download link was expired")
@@ -148,6 +141,12 @@ class FileserveCom(Hoster): self.setWait(wait_time + 3, True)
self.wait()
self.retry()
+ elif check == "limit":
+ #download limited reached for today (not a exact time known)
+
+ self.setWait(180 * 60, True) # wait 3 hours
+ self.wait()
+ self.retry(max_tries=0)
self.thread.m.reconnecting.wait(3) # Ease issue with later downloads appearing to be in parallel
|