diff options
-rw-r--r-- | module/plugins/crypter/TusfilesNetFolder.py | 4 | ||||
-rw-r--r-- | module/plugins/hooks/CaptchaBrotherhood.py | 8 | ||||
-rw-r--r-- | module/plugins/internal/MultiHoster.py | 6 | ||||
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 12 | ||||
-rw-r--r-- | module/plugins/internal/XFSHoster.py | 8 |
5 files changed, 20 insertions, 18 deletions
diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 0db3470cc..20bed0ab1 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -10,7 +10,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo class TusfilesNetFolder(XFSCrypter): __name__ = "TusfilesNetFolder" __type__ = "crypter" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P<ID>\w+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -33,7 +33,7 @@ class TusfilesNetFolder(XFSCrypter): return self.load(urljoin(self.pyfile.url, str(page_n)), decode=True) - def handleMultiPages(self): + def handlePages(self, pyfile): pages = re.search(self.PAGES_PATTERN, self.html) if pages: pages = int(math.ceil(int(pages.group('pages')) / 25.0)) diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py index b6e38d8bb..6d4127871 100644 --- a/module/plugins/hooks/CaptchaBrotherhood.py +++ b/module/plugins/hooks/CaptchaBrotherhood.py @@ -94,10 +94,10 @@ class CaptchaBrotherhood(Hook): req = getRequest() url = "%ssendNewCaptcha.aspx?%s" % (self.API_URL, - urlencode({"username": self.getConfig("username"), - "password": self.getConfig("passkey"), - "captchaSource": "pyLoad", - "timeout": "80"})) + urlencode({'username' : self.getConfig("username"), + 'password' : self.getConfig("passkey"), + 'captchaSource': "pyLoad", + 'timeout' : "80"})) req.c.setopt(pycurl.URL, url) req.c.setopt(pycurl.POST, 1) diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index 8cdb2fbff..810eab4ee 100644 --- a/module/plugins/internal/MultiHoster.py +++ b/module/plugins/internal/MultiHoster.py @@ -73,11 +73,11 @@ class MultiHoster(SimpleHoster): self.checkFile() - def handlePremium(self): - return self.handleFree() + def handlePremium(self, pyfile=None): + return self.handleFree(pyfile) - def handleFree(self): + def handleFree(self, pyfile=None): if self.premium: raise NotImplementedError else: diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index 566252245..c83ee8a78 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -12,7 +12,7 @@ from module.utils import fixup class SimpleCrypter(Crypter, SimpleHoster): __name__ = "SimpleCrypter" __type__ = "crypter" - __version__ = "0.36" + __version__ = "0.37" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), #: Overrides core.config['general']['folder_per_package'] @@ -108,7 +108,7 @@ class SimpleCrypter(Crypter, SimpleHoster): self.links = self.getLinks() if hasattr(self, 'PAGES_PATTERN') and hasattr(self, 'loadPage'): - self.handleMultiPages() + self.handlePages(pyfile) self.logDebug("Package has %d links" % len(self.links)) @@ -121,7 +121,9 @@ class SimpleCrypter(Crypter, SimpleHoster): def checkNameSize(self, getinfo=True): if getinfo: - self.updateInfo(self.getInfo(self.pyfile.url, self.html)) + self.logDebug("File info (BEFORE): %s" % self.info) + self.info.update(self.getInfo(self.pyfile.url, self.html)) + self.logDebug("File info (AFTER): %s" % self.info) name = self.info['name'] url = self.info['url'] @@ -133,7 +135,7 @@ class SimpleCrypter(Crypter, SimpleHoster): folder = self.info['folder'] = self.pyfile.name - self.logDebug("File name: %s" % self.pyfile.name, + self.logDebug("File name: %s" % self.pyfile.name, "File folder: %s" % folder) @@ -145,7 +147,7 @@ class SimpleCrypter(Crypter, SimpleHoster): return re.findall(self.LINK_PATTERN, self.html) - def handleMultiPages(self): + def handlePages(self, pyfile): try: m = re.search(self.PAGES_PATTERN, self.html) pages = int(m.group(1)) diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index 4555e7b0f..474e2ec10 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -82,7 +82,7 @@ class XFSHoster(SimpleHoster): self.directDL = bool(self.premium) - def handleFree(self): + def handleFree(self, pyfile=None): link = self.getDownloadLink() if link: @@ -101,8 +101,8 @@ class XFSHoster(SimpleHoster): self.fail(_("Download link not found")) - def handlePremium(self): - return self.handleFree() + def handlePremium(self, pyfile=None): + return self.handleFree(pyfile) def getDownloadLink(self): @@ -139,7 +139,7 @@ class XFSHoster(SimpleHoster): return m.group(1).strip() #@TODO: Remove .strip() in 0.4.10 - def handleMulti(self): + def handleMulti(self, pyfile=None): if not self.account: self.fail(_("Only registered or premium users can use url leech feature")) |