diff options
Diffstat (limited to 'module')
| -rw-r--r-- | module/plugins/hoster/FileserveCom.py | 2 | ||||
| -rw-r--r-- | module/plugins/hoster/FilesonicCom.py | 9 | ||||
| -rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 4 | 
3 files changed, 11 insertions, 4 deletions
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 852dbb5b8..0ab97a4c7 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -55,6 +55,7 @@ class FileserveCom(Hoster):              self.multiDL = False
          self.file_id = re.search(r"fileserve\.com/file/([a-zA-Z0-9]+)(http:.*)?", self.pyfile.url).group(1)
 +        self.pyfile.url = "http://www.fileserve.com/file/" + self.file_id
      def process(self, pyfile):
          self.html = self.load(self.pyfile.url, ref=False, cookies=False if self.account else True, utf8=True)
 @@ -81,7 +82,6 @@ class FileserveCom(Hoster):          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"})
 diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 1d5a5ceef..97060d36e 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -16,7 +16,6 @@ def getInfo(urls):          found = re.findall(r'<tr>\s+<td class="source"><span>([^<]+)</span></td>\s+<td class="fileName"><span>([^<]+)</span></td>\s+<td class="fileSize"><span>([0-9]+) MB</span></td>\s+<td class="availability"><span>\s+<strong style="font-weight: strong; color: green;">([^<]+)</strong><br />\s+</span>\s+</td>\s+</tr>', page, re.MULTILINE)
          result = []
          for src, name, size, status in found:
 -            print src, name, size, status
              result.append((name, int(size)*1024*1024, 2 if status == "Available" else 1, src))
 @@ -91,7 +90,9 @@ class FilesonicCom(Hoster):                  self.fail("implement need pw")
              chall = re.search(r'Recaptcha.create\("(.*?)",', self.html)
 -            if chall:
 +            for i in range(5):
 +                if not chall: break
 +
                  re_captcha = ReCaptcha(self)
                  challenge, result = re_captcha.challenge(chall.group(1))
 @@ -99,6 +100,10 @@ class FilesonicCom(Hoster):                              "recaptcha_response_field" : result}
                  self.html = self.load(link, post=postData)
 +                chall = re.search(r'Recaptcha.create\("(.*?)",', self.html)
 +
 +                if chall:
 +                    self.invalidCaptcha()
          url = re.search(realLinkRegexp, self.html).group(1)
          return url
 diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 2f6ce4739..6a4eedd51 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -107,7 +107,7 @@ class RapidshareCom(Hoster):              self.download(self.pyfile.url) -        elif self.api_data["status"] in ("4","5"): +        elif self.api_data["status"] in ("0","4","5"):              self.offline()          else:              self.fail("Unknown response code.") @@ -202,6 +202,8 @@ class RapidshareCom(Hoster):              self.setWait(120)              self.log.info(_("RapidShareCom: No free slots"))              self.wait() +        elif "This file is too big to download it for free" in result: +            self.fail(_("You need a premium account for this file"))          elif between_wait:              self.setWait(int(between_wait.group(1)))              self.wantReconnect = True  | 
