diff options
author | 2015-05-06 00:54:30 +0200 | |
---|---|---|
committer | 2015-05-06 00:54:30 +0200 | |
commit | 5fde0798809546698cf2b2eb4aa95d0c6aa68815 (patch) | |
tree | d63c152f37e2a03453f8c0d25b40209a753c8c47 /pyload/plugin/internal | |
parent | Merge branch 'stable' into 0.4.10 (diff) | |
download | pyload-5fde0798809546698cf2b2eb4aa95d0c6aa68815.tar.xz |
handleFree -> handle_free and so on...
Diffstat (limited to 'pyload/plugin/internal')
-rw-r--r-- | pyload/plugin/internal/MultiHoster.py | 12 | ||||
-rw-r--r-- | pyload/plugin/internal/SimpleCrypter.py | 4 | ||||
-rw-r--r-- | pyload/plugin/internal/SimpleHoster.py | 24 | ||||
-rw-r--r-- | pyload/plugin/internal/XFSHoster.py | 8 |
4 files changed, 24 insertions, 24 deletions
diff --git a/pyload/plugin/internal/MultiHoster.py b/pyload/plugin/internal/MultiHoster.py index 8dbcf4f30..06d78475b 100644 --- a/pyload/plugin/internal/MultiHoster.py +++ b/pyload/plugin/internal/MultiHoster.py @@ -61,7 +61,7 @@ class MultiHoster(SimpleHoster): if self.directDL: self.checkInfo() self.logDebug("Looking for direct download link...") - self.handleDirect(pyfile) + self.handle_direct(pyfile) if not self.link and not self.lastDownload: self.preload() @@ -71,11 +71,11 @@ class MultiHoster(SimpleHoster): if self.premium and (not self.CHECK_TRAFFIC or self.checkTrafficLeft()): self.logDebug("Handled as premium download") - self.handlePremium(pyfile) + self.handle_premium(pyfile) elif not self.LOGIN_ACCOUNT or (not self.CHECK_TRAFFIC or self.checkTrafficLeft()): self.logDebug("Handled as free download") - self.handleFree(pyfile) + self.handle_free(pyfile) self.downloadLink(self.link, True) self.checkFile() @@ -105,11 +105,11 @@ class MultiHoster(SimpleHoster): raise Fail(e) - def handlePremium(self, pyfile): - return self.handleFree(pyfile) + def handle_premium(self, pyfile): + return self.handle_free(pyfile) - def handleFree(self, pyfile): + def handle_free(self, pyfile): if self.premium: raise NotImplementedError else: diff --git a/pyload/plugin/internal/SimpleCrypter.py b/pyload/plugin/internal/SimpleCrypter.py index e22a4df29..dff543eed 100644 --- a/pyload/plugin/internal/SimpleCrypter.py +++ b/pyload/plugin/internal/SimpleCrypter.py @@ -94,7 +94,7 @@ class SimpleCrypter(Crypter, SimpleHoster): self.links = self.getLinks() if hasattr(self, 'PAGES_PATTERN') and hasattr(self, 'loadPage'): - self.handlePages(pyfile) + self.handle_pages(pyfile) self.logDebug("Package has %d links" % len(self.links)) @@ -142,7 +142,7 @@ class SimpleCrypter(Crypter, SimpleHoster): for link in re.findall(self.LINK_PATTERN, self.html)] - def handlePages(self, pyfile): + def handle_pages(self, pyfile): try: pages = int(re.search(self.PAGES_PATTERN, self.html).group(1)) except Exception: diff --git a/pyload/plugin/internal/SimpleHoster.py b/pyload/plugin/internal/SimpleHoster.py index d3e2edc48..7ba7db8da 100644 --- a/pyload/plugin/internal/SimpleHoster.py +++ b/pyload/plugin/internal/SimpleHoster.py @@ -287,7 +287,7 @@ class SimpleHoster(Hoster): example: ERROR_PATTERN = r'' - Instead overriding handleFree and handlePremium methods you can define the following patterns for direct download: + Instead overriding handle_free and handle_premium methods you can define the following patterns for direct download: LINK_FREE_PATTERN: (optional) group(1) should be the direct link for free download example: LINK_FREE_PATTERN = r'<div class="link"><a href="(.+?)"' @@ -303,8 +303,8 @@ class SimpleHoster(Hoster): TEXT_ENCODING = False #: Set to True or encoding name if encoding value in http header is not correct COOKIES = True #: or False or list of tuples [(domain, name, value)] CHECK_TRAFFIC = False #: Set to True to force checking traffic left for premium account - DIRECT_LINK = None #: Set to True to looking for direct link (as defined in handleDirect method), set to None to do it if self.account is True else False - MULTI_HOSTER = False #: Set to True to leech other hoster link (as defined in handleMulti method) + DIRECT_LINK = None #: Set to True to looking for direct link (as defined in handle_direct method), set to None to do it if self.account is True else False + MULTI_HOSTER = False #: Set to True to leech other hoster link (as defined in handle_multi method) LOGIN_ACCOUNT = False #: Set to True to require account login DISPOSITION = True #: Set to True to use any content-disposition value in http header as file name @@ -462,11 +462,11 @@ class SimpleHoster(Hoster): if self.directDL: self.logDebug("Looking for direct download link...") - self.handleDirect(pyfile) + self.handle_direct(pyfile) if self.multihost and not self.link and not self.lastDownload: self.logDebug("Looking for leeched download link...") - self.handleMulti(pyfile) + self.handle_multi(pyfile) if not self.link and not self.lastDownload: self.MULTI_HOSTER = False @@ -478,11 +478,11 @@ class SimpleHoster(Hoster): if self.premium and (not self.CHECK_TRAFFIC or self.checkTrafficLeft()): self.logDebug("Handled as premium download") - self.handlePremium(pyfile) + self.handle_premium(pyfile) elif not self.LOGIN_ACCOUNT or (not self.CHECK_TRAFFIC or self.checkTrafficLeft()): self.logDebug("Handled as free download") - self.handleFree(pyfile) + self.handle_free(pyfile) self.downloadLink(self.link, self.DISPOSITION) self.checkFile() @@ -659,7 +659,7 @@ class SimpleHoster(Hoster): return self.info - def handleDirect(self, pyfile): + def handle_direct(self, pyfile): link = self.directLink(pyfile.url, self.resumeDownload) if link: @@ -669,11 +669,11 @@ class SimpleHoster(Hoster): self.logDebug("Direct download link not found") - def handleMulti(self, pyfile): #: Multi-hoster handler + def handle_multi(self, pyfile): #: Multi-hoster handler pass - def handleFree(self, pyfile): + def handle_free(self, pyfile): if not hasattr(self, 'LINK_FREE_PATTERN'): self.logError(_("Free download not implemented")) @@ -684,11 +684,11 @@ class SimpleHoster(Hoster): self.link = m.group(1) - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): if not hasattr(self, 'LINK_PREMIUM_PATTERN'): self.logError(_("Premium download not implemented")) self.logDebug("Handled as free download") - self.handleFree(pyfile) + self.handle_free(pyfile) m = re.search(self.LINK_PREMIUM_PATTERN, self.html) if m is None: diff --git a/pyload/plugin/internal/XFSHoster.py b/pyload/plugin/internal/XFSHoster.py index 956f02b95..0a2dc4fbb 100644 --- a/pyload/plugin/internal/XFSHoster.py +++ b/pyload/plugin/internal/XFSHoster.py @@ -84,7 +84,7 @@ class XFSHoster(SimpleHoster): self.directDL = self.premium - def handleFree(self, pyfile): + def handle_free(self, pyfile): for i in xrange(1, 6): self.logDebug("Getting download link: #%d" % i) @@ -112,11 +112,11 @@ class XFSHoster(SimpleHoster): self.link = m.group(1) - def handlePremium(self, pyfile): - return self.handleFree(pyfile) + def handle_premium(self, pyfile): + return self.handle_free(pyfile) - def handleMulti(self, pyfile): + def handle_multi(self, pyfile): if not self.account: self.fail(_("Only registered or premium users can use url leech feature")) |