summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/SimpleHoster.py4
-rw-r--r--module/plugins/internal/XFSHoster.py27
2 files changed, 3 insertions, 28 deletions
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):