summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-31 15:30:33 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-31 15:30:33 +0200
commita321e0d4ab22373933c7d9c0a0d26996889004a5 (patch)
treedb57afef8689aac95f62c76fd6c0124bad304456 /module/plugins/hoster
parentadded confirmation dialog before deleting a package (diff)
downloadpyload-a321e0d4ab22373933c7d9c0a0d26996889004a5.tar.xz
closed #357, #384
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/FileserveCom.py25
-rw-r--r--module/plugins/hoster/NetloadIn.py5
2 files changed, 13 insertions, 17 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
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index d913d3a6f..59786d996 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -55,9 +55,8 @@ class NetloadIn(Hoster):
__name__ = "NetloadIn"
__type__ = "hoster"
__pattern__ = r"http://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)"
- __version__ = "0.32"
+ __version__ = "0.33"
__description__ = """Netload.in Download Hoster"""
- __config__ = [ ("dumpgen", "bool", "Generate debug page dumps on stdout", "False") ]
__author_name__ = ("spoob", "RaNaN", "Gregy")
__author_mail__ = ("spoob@pyload.org", "ranan@pyload.org", "gregy@gregy.cz")
@@ -162,8 +161,6 @@ class NetloadIn(Hoster):
self.fail(_("File temporarily not available"))
self.log.debug("Netload: try number %d " % i)
- if self.getConf('dumpgen'):
- print page
if re.search(r"(We will prepare your download..)", page) is not None:
self.log.debug("Netload: We will prepare your download")