diff options
Diffstat (limited to 'pyload/plugin/internal/XFSHoster.py')
-rw-r--r-- | pyload/plugin/internal/XFSHoster.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pyload/plugin/internal/XFSHoster.py b/pyload/plugin/internal/XFSHoster.py index d2d5fb0dd..4cef261df 100644 --- a/pyload/plugin/internal/XFSHoster.py +++ b/pyload/plugin/internal/XFSHoster.py @@ -52,10 +52,12 @@ class XFSHoster(SimpleHoster): FORM_PATTERN = None FORM_INPUTS_MAP = None #: dict passed as input_names to parseHtmlForm + def setup(self): self.chunkLimit = -1 if self.premium else 1 self.resumeDownload = self.multiDL = self.premium + def prepare(self): """ Initialize important variables """ if not self.HOSTER_DOMAIN: @@ -84,6 +86,7 @@ class XFSHoster(SimpleHoster): if self.DIRECT_LINK is None: self.directDL = self.premium + def handleFree(self, pyfile): for i in xrange(1, 6): self.logDebug("Getting download link: #%d" % i) @@ -111,9 +114,11 @@ class XFSHoster(SimpleHoster): self.link = m.group(1).strip() #@TODO: Remove .strip() in 0.4.10 + def handlePremium(self, pyfile): return self.handleFree(pyfile) + def handleMulti(self, pyfile): if not self.account: self.fail(_("Only registered or premium users can use url leech feature")) @@ -171,6 +176,7 @@ class XFSHoster(SimpleHoster): if 'location' in header: #: Direct download link self.link = header['location'] + def checkErrors(self): m = re.search(self.ERROR_PATTERN, self.html) if m is None: @@ -223,6 +229,7 @@ class XFSHoster(SimpleHoster): else: self.info.pop('error', None) + def getPostParameters(self): if self.FORM_PATTERN or self.FORM_INPUTS_MAP: action, inputs = self.parseHtmlForm(self.FORM_PATTERN or "", self.FORM_INPUTS_MAP or {}) @@ -268,6 +275,7 @@ class XFSHoster(SimpleHoster): return inputs + def handleCaptcha(self, inputs): m = re.search(self.CAPTCHA_PATTERN, self.html) if m: |