diff options
Diffstat (limited to 'module')
| -rw-r--r-- | module/plugins/hoster/DepositfilesCom.py | 2 | ||||
| -rw-r--r-- | module/plugins/hoster/UlozTo.py | 19 | ||||
| -rw-r--r-- | module/plugins/internal/SimpleHoster.py | 4 | 
3 files changed, 15 insertions, 10 deletions
| diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index b02445005..13a8abe03 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -48,6 +48,8 @@ class DepositfilesCom(SimpleHoster):              self.handleFree()      def handleFree(self): +        self.html = self.load(self.pyfile.url, post={"gateway_result":"1"}) +        if re.search(self.FILE_OFFLINE_PATTERN, self.html): self.offline()          if re.search(r'File is checked, please try again in a minute.', self.html) is not None:              self.log.info("DepositFiles.com: The file is being checked. Waiting 1 minute.") diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index b9ec4c5d7..ffb09a655 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -24,12 +24,9 @@ def getInfo(urls):      result = []      for url in urls: -        try: -            file_info = parseFileInfo(IfileIt, url, getURL(url, decode=True))  -            result.append(file_info) -        except Exception, e: -            self.logError(e) -            result.append((url, 0, 1, url)) +        file_info = parseFileInfo(UlozTo, url, getURL(url, decode=True)) +        print file_info  +        result.append(file_info)      yield result @@ -37,7 +34,7 @@ class UlozTo(SimpleHoster):      __name__ = "UlozTo"      __type__ = "hoster"      __pattern__ = r"http://(\w*\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj.cz|zachowajto.pl)/.*" -    __version__ = "0.71" +    __version__ = "0.73"      __description__ = """uloz.to"""      __config__ = [("reuseCaptcha", "bool", "Reuse captcha", "True"),          ("captchaUser", "str", "captcha_user", ""), @@ -59,8 +56,14 @@ class UlozTo(SimpleHoster):          self.multiDL = False      def process(self, pyfile): +        header = self.load(pyfile.url, just_header=True) +        if "location" in header and "utm_source=old" in header['location']: +            self.offline() +              self.html = self.load(pyfile.url, decode=True) -        self.getFileInfo() +         +        if self.PASSWD_PATTERN in self.html: +            self.fail("Password protected link")          if re.search(self.VIPLINK_PATTERN, self.html):              self.html = self.load(pyfile.url, get={"disclaimer": "1"}) diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index f4434d3f8..a05b6e98c 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -23,7 +23,7 @@ from re import search  def parseFileInfo(self, url = '', html = ''):           if not html and hasattr(self, "html"): html = self.html -    name, size, status, found = '', 0, 0, 0 +    name, size, status, found = '', 0, 3, 0      if hasattr(self, "FILE_OFFLINE_PATTERN") and search(self.FILE_OFFLINE_PATTERN, html):          # File offline @@ -88,7 +88,7 @@ class SimpleHoster(Hoster):          name, size, status, url = parseFileInfo(self)                     if status == 1:               self.offline() -        elif status == 0:  +        elif status != 2:               self.parseError('File info')          if not name: | 
