diff options
| author | 2015-02-11 03:58:19 +0100 | |
|---|---|---|
| committer | 2015-02-11 03:58:19 +0100 | |
| commit | d952efb58d72b0add82efe34a7f2fbdc51423490 (patch) | |
| tree | 30e7982dc2c2dde195c6bf25f500f1e236ba5ef7 /module/plugins | |
| parent | [ZippyshareCom] Update get_checksum (diff) | |
| download | pyload-d952efb58d72b0add82efe34a7f2fbdc51423490.tar.xz | |
[XFSHoster] Fix https://github.com/pyload/pyload/issues/1112
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/hoster/UpleaCom.py | 2 | ||||
| -rw-r--r-- | module/plugins/internal/SimpleHoster.py | 4 | ||||
| -rw-r--r-- | module/plugins/internal/XFSHoster.py | 27 | 
3 files changed, 4 insertions, 29 deletions
| diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 8faad1d8f..59c593c93 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -52,8 +52,8 @@ class UpleaCom(XFSHoster):          if m is None:              self.error(_("LINK_PATTERN not found")) -        self.wait(15)          self.link = m.group(1) +        self.wait(15)  getInfo = create_getInfo(UpleaCom) diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index e820ab141..e4ff1a2d8 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -483,7 +483,7 @@ class SimpleHoster(Hoster):                  self.logDebug("Handled as free download")                  self.handleFree(pyfile) -        self.downloadLink(self.link, self.DISPOSITION)  #: Remove `DISPOSITION` in 0.4.10 +        self.downloadLink(self.link, self.DISPOSITION)  #: Remove `self.DISPOSITION` in 0.4.10          self.checkFile() @@ -599,7 +599,7 @@ class SimpleHoster(Hoster):              pass          self.logDebug("File name: %s" % self.pyfile.name, -                      "File size: %s" % (self.pyfile.size if self.pyfile.size > 0 else "Unknown")) +                      "File size: %s byte" % self.pyfile.size if self.pyfile.size > 0 else "File size: Unknown")      def checkInfo(self): diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index 624db87b7..a4e9b413c 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -16,7 +16,7 @@ from module.utils import html_unescape  class XFSHoster(SimpleHoster):      __name__    = "XFSHoster"      __type__    = "hoster" -    __version__ = "0.42" +    __version__ = "0.43"      __pattern__ = r'^unmatchable$' @@ -89,27 +89,6 @@ class XFSHoster(SimpleHoster):              self.directDL = self.premium -    def downloadLink(self, link, disposition=True): -        if link and isinstance(link, basestring): -            self.correctCaptcha() - -            if not urlparse(link).scheme: -                url_p   = urlparse(self.pyfile.url) -                baseurl = "%s://%s" % (url_p.scheme, url_p.netloc) -                link    = urljoin(baseurl, link) - -            self.download(link, ref=False, disposition=disposition) - -        elif self.errmsg: -            if 'captcha' in self.errmsg: -                self.fail(_("No valid captcha code entered")) -            else: -                self.fail(self.errmsg) - -        else: -            self.fail(_("Download link not found")) - -      def handleFree(self, pyfile):          for i in xrange(1, 6):              self.logDebug("Getting download link: #%d" % i) @@ -139,8 +118,6 @@ class XFSHoster(SimpleHoster):              self.logError(data['op'] if 'op' in data else _("UNKNOWN"))              return "" -        self.errmsg = None -          self.link = m.group(1).strip()  #@TODO: Remove .strip() in 0.4.10 @@ -204,8 +181,6 @@ class XFSHoster(SimpleHoster):          if 'location' in header:  #: Direct download link              self.link = header['location'] -        else: -            self.fail(_("Download link not found"))      def checkErrors(self): | 
