summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-11 23:41:40 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-11 23:41:40 +0100
commitb692dc0ba8e8940844eb647a1f15e435a55ce4eb (patch)
tree1653344e5b37504894fe2c2e226f9d8d094bd3bb /module/plugins/hoster
parentfixed DepositFile free (diff)
downloadpyload-b692dc0ba8e8940844eb647a1f15e435a55ce4eb.tar.xz
closed #259, #250
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/DepositfilesCom.py5
-rw-r--r--module/plugins/hoster/FileserveCom.py44
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py14
3 files changed, 45 insertions, 18 deletions
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index 3c1124709..b2cab30de 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -48,8 +48,9 @@ class DepositfilesCom(Hoster):
wait_time = int(wait.group(1))
self.log.info( "%s: Traffic used up. Waiting %d seconds." % (self.__name__, wait_time) )
self.setWait(wait_time)
- if wait_time > 300:
- self.wantReconnect = True
+ self.wantReconnect = True
+ self.wait()
+ self.retry()
wait = re.search(r'>Try in (\d+) minutes or use GOLD account', self.html)
if wait:
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 2e1bb1a59..9e14bfe7d 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -38,7 +38,7 @@ def getInfo(urls):
class FileserveCom(Hoster):
__name__ = "FileserveCom"
__type__ = "hoster"
- __pattern__ = r"http://(www\.)?fileserve\.com/file/.*?(/.*)?"
+ __pattern__ = r"http://(www\.)?fileserve\.com/file/[a-zA-Z0-9]+"
__version__ = "0.3"
__description__ = """Fileserve.Com File Download Hoster"""
__author_name__ = ("jeix", "mkaay")
@@ -54,6 +54,8 @@ class FileserveCom(Hoster):
else:
self.multiDL = False
+ self.file_id = re.search(r"fileserve\.com/file/([a-zA-Z0-9]+)(http:.*)?", self.pyfile.url).group(1)
+
def process(self, pyfile):
self.html = self.load(self.pyfile.url, ref=False, cookies=False if self.account else True, utf8=True)
@@ -76,7 +78,26 @@ class FileserveCom(Hoster):
self.download(self.pyfile.url, post={"download":"premium"}, cookies=True)
def handleFree(self):
-
+
+ self.html = self.load(self.pyfile.url)
+ jsPage = re.search(r"\"(/landing/.*?/download_captcha\.js)\"", self.html)
+ self.req.putHeader("X-Requested-With", "XMLHttpRequest")
+
+ jsPage = self.load("http://fileserve.com" + jsPage.group(1))
+ action = self.load(self.pyfile.url, post={"checkDownload" : "check"})
+
+ if "timeLimit" in action:
+ html = self.load(self.pyfile.url, post={"checkDownload" : "showError", "errorType" : "timeLimit"})
+ wait = re.search(r"You need to wait (\d+) seconds to start another download", html)
+ if wait:
+ wait = int(wait.group(1))
+ else:
+ wait = 720
+
+ self.setWait(wait, True)
+ self.wait()
+ self.retry()
+
if r'<div id="captchaArea" style="display:none;">' in self.html or \
r'/showCaptcha\(\);' in self.html:
# we got a captcha
@@ -84,18 +105,25 @@ class FileserveCom(Hoster):
recaptcha = ReCaptcha(self)
challenge, code = recaptcha.challenge(id)
- shortencode = re.search(r'name="recaptcha_shortencode_field" value="(.*?)"', self.html).group(1)
-
self.html = self.load(r'http://www.fileserve.com/checkReCaptcha.php', post={'recaptcha_challenge_field':challenge,
- 'recaptcha_response_field':code, 'recaptcha_shortencode_field': shortencode})
+ 'recaptcha_response_field':code, 'recaptcha_shortencode_field': self.file_id})
if r'incorrect-captcha-sol' in self.html:
+ self.invalidCaptcha()
self.retry()
wait = self.load(self.pyfile.url, post={"downloadLink":"wait"})
- wait = wait.decode("UTF-8").encode("ascii", "ignore") # Remove unicode stuff
- self.setWait(int(wait)+3)
- self.wait()
+ wait = re.search(r".*?(\d+).*?", wait)
+ if wait:
+ wait = wait.group(1)
+ if wait == "404":
+ self.log.debug("No wait time returned")
+ self.setWait(30)
+ else:
+ self.setWait(int(wait))
+
+ self.wait()
+
# show download link
self.load(self.pyfile.url, post={"downloadLink":"show"})
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index 419d677f6..6dd8933c0 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -37,7 +37,7 @@ def getInfo(urls):
class ShareonlineBiz(Hoster):
__name__ = "ShareonlineBiz"
__type__ = "hoster"
- __pattern__ = r"(?:http://)?(?:www.)?share-online.biz/(download.php\?id=|dl/)"
+ __pattern__ = r"http://[\w\.]*?(share\-online\.biz|egoshare\.com)/(download.php\?id\=|dl/)[\w]+"
__version__ = "0.2"
__description__ = """Shareonline.biz Download Hoster"""
__author_name__ = ("spoob", "mkaay")
@@ -47,16 +47,15 @@ class ShareonlineBiz(Hoster):
# range request not working?
# api supports resume, only one chunk
# website isn't supporting resuming in first place
+ self.file_id = re.search(r"(id\=|/dl/)([a-zA-Z0-9]+)", self.pyfile.url).group(2)
+ self.pyfile.url = "http://www.share-online.biz/dl/" + self.file_id
+
self.multiDL = False
self.chunkLimit = 1
if self.account and self.account.isPremium(self.user):
self.multiDL = True
def process(self, pyfile):
- self.pyfile.url = self.pyfile.url.replace("http://www.share-online.biz/download.php?id=", "http://www.share-online.biz/dl/")
- self.pyfile.url = self.pyfile.url.replace("http://share-online.biz/download.php?id=", "http://www.share-online.biz/dl/")
- self.pyfile.url = self.pyfile.url.replace("http://share-online.biz/dl/", "http://www.share-online.biz/dl/")
-
self.downloadAPIData()
pyfile.name = self.api_data["filename"]
pyfile.sync()
@@ -86,7 +85,7 @@ class ShareonlineBiz(Hoster):
self.resumeDownload = False
self.html = self.load(self.pyfile.url) #refer, stuff
- self.html = self.load("%s/free/" % self.pyfile.url, post={"dl_free":"1"})
+ self.html = self.load("%s/free/" % self.pyfile.url, post={"dl_free":"1", "choice": "free"})
if re.search(r"/failure/full/1", self.req.lastEffectiveURL):
self.setWait(120)
self.log.info("%s: no free slots, waiting 120 seconds" % (self.__name__))
@@ -122,9 +121,8 @@ class ShareonlineBiz(Hoster):
self.fail("DL API error")
self.req.cj.setCookie("share-online.biz", "dl", info["dl"])
- lid = self.pyfile.url.replace("http://www.share-online.biz/dl/", "") #cut of everything but the id
- src = self.load("http://api.share-online.biz/account.php?username=%s&password=%s&act=download&lid=%s" % (self.user, self.account.accounts[self.user]["password"], lid), post={})
+ src = self.load("http://api.share-online.biz/account.php?username=%s&password=%s&act=download&lid=%s" % (self.user, self.account.accounts[self.user]["password"], self.file_id), post={})
dlinfo = {}
for line in src.splitlines():
key, value = line.split(": ")