diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-09 03:25:42 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-09 03:25:42 +0100 |
commit | ea2d07843d369d8b8fd2aa02930bf549ce94a661 (patch) | |
tree | d74957918b4741e3a31c4ba007b23324e16bd53a /module/plugins | |
parent | [SimpleHoster] Better checkDownload rules (diff) | |
download | pyload-ea2d07843d369d8b8fd2aa02930bf549ce94a661.tar.xz |
Spare fixes
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/accounts/FourSharedCom.py (renamed from module/plugins/accounts/_4SharedCom.py) | 4 | ||||
-rw-r--r-- | module/plugins/accounts/HundredEightyUploadCom.py (renamed from module/plugins/accounts/_180UploadCom.py) | 4 | ||||
-rw-r--r-- | module/plugins/accounts/OneFichierCom.py (renamed from module/plugins/accounts/_1FichierCom.py) | 4 | ||||
-rw-r--r-- | module/plugins/crypter/FourChanOrg.py (renamed from module/plugins/crypter/_4ChanOrg.py) | 4 | ||||
-rw-r--r-- | module/plugins/crypter/OneKhDe.py (renamed from module/plugins/crypter/_1KhDe.py) | 5 | ||||
-rw-r--r-- | module/plugins/crypter/XFileSharingProFolder.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/FourSharedCom.py (renamed from module/plugins/hoster/_4SharedCom.py) | 6 | ||||
-rw-r--r-- | module/plugins/hoster/HundredEightyUploadCom.py | 21 | ||||
-rw-r--r-- | module/plugins/hoster/OneFichierCom.py (renamed from module/plugins/hoster/_1FichierCom.py) | 6 | ||||
-rw-r--r-- | module/plugins/hoster/TwoSharedCom.py (renamed from module/plugins/hoster/_2SharedCom.py) | 6 | ||||
-rw-r--r-- | module/plugins/hoster/XFileSharingPro.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/MultiHook.py | 36 | ||||
-rw-r--r-- | module/plugins/internal/MultiHoster.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 10 | ||||
-rw-r--r-- | module/plugins/internal/XFSHoster.py | 2 |
15 files changed, 71 insertions, 45 deletions
diff --git a/module/plugins/accounts/_4SharedCom.py b/module/plugins/accounts/FourSharedCom.py index 680ec4513..2777a142a 100644 --- a/module/plugins/accounts/_4SharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -3,8 +3,8 @@ from module.plugins.Account import Account -class _4SharedCom(Account): - __name__ = "4SharedCom" +class FourSharedCom(Account): + __name__ = "FourSharedCom" __type__ = "account" __version__ = "0.04" diff --git a/module/plugins/accounts/_180UploadCom.py b/module/plugins/accounts/HundredEightyUploadCom.py index 664e3fa8d..319a3feee 100644 --- a/module/plugins/accounts/_180UploadCom.py +++ b/module/plugins/accounts/HundredEightyUploadCom.py @@ -3,8 +3,8 @@ from module.plugins.internal.XFSAccount import XFSAccount -class _180UploadCom(XFSAccount): - __name__ = "180UploadCom" +class HundredEightyUploadCom(XFSAccount): + __name__ = "HundredEightyUploadCom" __type__ = "account" __version__ = "0.03" diff --git a/module/plugins/accounts/_1FichierCom.py b/module/plugins/accounts/OneFichierCom.py index 70bb3ec1c..1fc8d994d 100644 --- a/module/plugins/accounts/_1FichierCom.py +++ b/module/plugins/accounts/OneFichierCom.py @@ -9,8 +9,8 @@ from pycurl import REFERER from module.plugins.Account import Account -class _1FichierCom(Account): - __name__ = "1FichierCom" +class OneFichierCom(Account): + __name__ = "OneFichierCom" __type__ = "account" __version__ = "0.12" diff --git a/module/plugins/crypter/_4ChanOrg.py b/module/plugins/crypter/FourChanOrg.py index a5e815639..c3fe3db4b 100644 --- a/module/plugins/crypter/_4ChanOrg.py +++ b/module/plugins/crypter/FourChanOrg.py @@ -7,8 +7,8 @@ import re from module.plugins.Crypter import Crypter -class _4ChanOrg(Crypter): - __name__ = "4ChanOrg" +class FourChanOrg(Crypter): + __name__ = "FourChanOrg" __type__ = "crypter" __version__ = "0.31" diff --git a/module/plugins/crypter/_1KhDe.py b/module/plugins/crypter/OneKhDe.py index c8ac3020c..3e75d97b5 100644 --- a/module/plugins/crypter/_1KhDe.py +++ b/module/plugins/crypter/OneKhDe.py @@ -3,11 +3,12 @@ import re from module.unescape import unescape + from module.plugins.Crypter import Crypter -class _1KhDe(Crypter): - __name__ = "1KhDe" +class OneKhDe(Crypter): + __name__ = "OneKhDe" __type__ = "crypter" __version__ = "0.11" diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py index 5ad9f7678..55cd41931 100644 --- a/module/plugins/crypter/XFileSharingProFolder.py +++ b/module/plugins/crypter/XFileSharingProFolder.py @@ -34,7 +34,7 @@ class XFileSharingProFolder(XFSCrypter): self.HOSTER_NAME = "".join([part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.']) if self.HOSTER_NAME[0].isdigit(): - self.HOSTER_NAME = '_' + self.HOSTER_NAME + self.HOSTER_NAME = 'X' + self.HOSTER_NAME account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME) diff --git a/module/plugins/hoster/_4SharedCom.py b/module/plugins/hoster/FourSharedCom.py index a3504e405..78aeece44 100644 --- a/module/plugins/hoster/_4SharedCom.py +++ b/module/plugins/hoster/FourSharedCom.py @@ -5,8 +5,8 @@ import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -class _4SharedCom(SimpleHoster): - __name__ = "4SharedCom" +class FourSharedCom(SimpleHoster): + __name__ = "FourSharedCom" __type__ = "hoster" __version__ = "0.31" @@ -59,4 +59,4 @@ class _4SharedCom(SimpleHoster): self.wait(20) -getInfo = create_getInfo(_4SharedCom) +getInfo = create_getInfo(FourSharedCom) diff --git a/module/plugins/hoster/HundredEightyUploadCom.py b/module/plugins/hoster/HundredEightyUploadCom.py new file mode 100644 index 000000000..4fc96a2b1 --- /dev/null +++ b/module/plugins/hoster/HundredEightyUploadCom.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo + + +class HundredEightyUploadCom(XFSHoster): + __name__ = "HundredEightyUploadCom" + __type__ = "hoster" + __version__ = "0.04" + + __pattern__ = r'http://(?:www\.)?180upload\.com/\w{12}' + + __description__ = """180upload.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("stickell", "l.stickell@yahoo.it")] + + + HOSTER_DOMAIN = "180upload.com" + + +getInfo = create_getInfo(HundredEightyUploadCom) diff --git a/module/plugins/hoster/_1FichierCom.py b/module/plugins/hoster/OneFichierCom.py index 528ad0f48..f9c0dbe85 100644 --- a/module/plugins/hoster/_1FichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -5,8 +5,8 @@ import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -class _1FichierCom(SimpleHoster): - __name__ = "1FichierCom" +class OneFichierCom(SimpleHoster): + __name__ = "OneFichierCom" __type__ = "hoster" __version__ = "0.76" @@ -57,4 +57,4 @@ class _1FichierCom(SimpleHoster): return self.handleFree(pyfile) -getInfo = create_getInfo(_1FichierCom) +getInfo = create_getInfo(OneFichierCom) diff --git a/module/plugins/hoster/_2SharedCom.py b/module/plugins/hoster/TwoSharedCom.py index a974fac58..c6ca2ab29 100644 --- a/module/plugins/hoster/_2SharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -5,8 +5,8 @@ import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -class _2SharedCom(SimpleHoster): - __name__ = "2SharedCom" +class TwoSharedCom(SimpleHoster): + __name__ = "TwoSharedCom" __type__ = "hoster" __version__ = "0.13" @@ -29,4 +29,4 @@ class _2SharedCom(SimpleHoster): self.multiDL = True -getInfo = create_getInfo(_2SharedCom) +getInfo = create_getInfo(TwoSharedCom) diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index 8d9ec9871..1794ae513 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -35,7 +35,7 @@ class XFileSharingPro(XFSHoster): self.HOSTER_NAME = "".join([part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.']) if self.HOSTER_NAME[0].isdigit(): - self.HOSTER_NAME = '_' + self.HOSTER_NAME + self.HOSTER_NAME = 'X' + self.HOSTER_NAME account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME) diff --git a/module/plugins/internal/MultiHook.py b/module/plugins/internal/MultiHook.py index 202868175..82a0a68ea 100644 --- a/module/plugins/internal/MultiHook.py +++ b/module/plugins/internal/MultiHook.py @@ -27,22 +27,26 @@ class MultiHook(Hook): MIN_INTERVAL = 1 * 60 * 60 - DOMAIN_REPLACEMENTS = [(r'\d+.+' , "_\0" ), - (r'bayfiles\.net' , "bayfiles.com" ), - (r'cloudnator\.com' , "shragle.com" ), - (r'dfiles\.eu' , "depositfiles.com"), - (r'easy-share\.com' , "crocko.com" ), - (r'freakshare\.net' , "freakshare.com" ), - (r'hellshare\.com' , "hellshare.cz" ), - (r'ifile\.it' , "filecloud.io" ), - (r'nowdownload\.\w+', "nowdownload.sx" ), - (r'nowvideo\.\w+' , "nowvideo.sx" ), - (r'putlocker\.com' , "firedrive.com" ), - (r'share-?rapid\.cz', "multishare.cz" ), - (r'ul\.to' , "uploaded.to" ), - (r'uploaded\.net' , "uploaded.to" ), - (r'uploadhero\.co' , "uploadhero.com" ), - (r'zshares\.net' , "zshare.net" )] + DOMAIN_REPLACEMENTS = [(r'180upload.com' , "hundredeightyupload.com"), + (r'1fichier.com' , "onefichier.com" ), + (r'2shared.com' , "twoshared.com" ), + (r'4shared.com' , "fourshared.com" ), + (r'bayfiles\.net' , "bayfiles.com" ), + (r'cloudnator\.com' , "shragle.com" ), + (r'dfiles\.eu' , "depositfiles.com" ), + (r'easy-share\.com' , "crocko.com" ), + (r'freakshare\.net' , "freakshare.com" ), + (r'hellshare\.com' , "hellshare.cz" ), + (r'ifile\.it' , "filecloud.io" ), + (r'nowdownload\.\w+', "nowdownload.sx" ), + (r'nowvideo\.\w+' , "nowvideo.sx" ), + (r'putlocker\.com' , "firedrive.com" ), + (r'share-?rapid\.cz', "multishare.cz" ), + (r'ul\.to' , "uploaded.to" ), + (r'uploaded\.net' , "uploaded.to" ), + (r'uploadhero\.co' , "uploadhero.com" ), + (r'zshares\.net' , "zshare.net" ), + (r'\d+.+' , "X\0" )] def setup(self): diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index ae06eaf4b..b6eaf34aa 100644 --- a/module/plugins/internal/MultiHoster.py +++ b/module/plugins/internal/MultiHoster.py @@ -77,11 +77,11 @@ class MultiHoster(SimpleHoster): if self.premium and (not self.CHECK_TRAFFIC or self.checkTrafficLeft()): self.logDebug("Handled as premium download") - self.handlePremium() + self.handlePremium(pyfile) elif not self.LOGIN_ACCOUNT or (not self.CHECK_TRAFFIC or self.checkTrafficLeft()): self.logDebug("Handled as free download") - self.handleFree() + self.handleFree(pyfile) self.downloadLink(self.link) self.checkFile() diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 5450f2bc9..2a6624e10 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -261,7 +261,7 @@ class SimpleHoster(Hoster): def apiInfo(cls, url="", get={}, post={}): url = unquote(url) return {'name' : (urlparse(url).path.split('/')[-1] - or urlparse(url).query.split('&', 1)[0].split('=', 1)[1] + or urlparse(url).query.split('=', 1)[::-1][0].split('&', 1)[0] or _("Unknown")), 'size' : 0, 'status': 3, @@ -417,11 +417,11 @@ class SimpleHoster(Hoster): if self.premium and (not self.CHECK_TRAFFIC or self.checkTrafficLeft()): self.logDebug("Handled as premium download") - self.handlePremium() + self.handlePremium(pyfile) elif not self.LOGIN_ACCOUNT or (not self.CHECK_TRAFFIC or self.checkTrafficLeft()): self.logDebug("Handled as free download") - self.handleFree() + self.handleFree(pyfile) self.downloadLink(self.link) self.checkFile() @@ -430,7 +430,7 @@ class SimpleHoster(Hoster): def downloadLink(self, link): if link and isinstance(link, basestring): self.correctCaptcha() - self.download(link, disposition=True) + self.download(link, disposition=False) #@TODO: Set `disposition=True` in 0.4.10 def checkFile(self): @@ -579,7 +579,7 @@ class SimpleHoster(Hoster): if not hasattr(self, 'LINK_PREMIUM_PATTERN'): self.logError(_("Premium download not implemented")) self.logDebug("Handled as free download") - self.handleFree() + self.handleFree(pyfile) try: m = re.search(self.LINK_PREMIUM_PATTERN, self.html) diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index 873df8989..b32f5978f 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -83,7 +83,7 @@ class XFSHoster(SimpleHoster): if self.captcha: self.correctCaptcha() - self.download(link, ref=True, cookies=True, disposition=True) + self.download(link, ref=True, cookies=True, disposition=False) #@TODO: Set `disposition=True` in 0.4.10 elif self.errmsg: if 'captcha' in self.errmsg: |