diff options
Diffstat (limited to 'module/plugins')
33 files changed, 56 insertions, 49 deletions
diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py index 4c370390c..d445428b3 100644 --- a/module/plugins/accounts/FastshareCz.py +++ b/module/plugins/accounts/FastshareCz.py @@ -3,7 +3,7 @@ import re from module.plugins.internal.Account import Account -from module.plugins.internal.Plugin import set_cookie +from module.plugins.internal.utils import set_cookie class FastshareCz(Account): diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index 96b8b6379..65c7f2f6f 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.utils import json from module.plugins.internal.Account import Account -from module.plugins.internal.Plugin import set_cookie +from module.plugins.internal.utils import json, set_cookie class FilecloudIo(Account): diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 11801941b..e3ea517cd 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from module.plugins.internal.Account import Account -from module.plugins.internal.Plugin import set_cookie +from module.plugins.internal.utils import set_cookie class FourSharedCom(Account): diff --git a/module/plugins/accounts/HighWayMe.py b/module/plugins/accounts/HighWayMe.py index d91dd52f4..e28baeef3 100644 --- a/module/plugins/accounts/HighWayMe.py +++ b/module/plugins/accounts/HighWayMe.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.utils import json from module.plugins.internal.MultiAccount import MultiAccount +from module.plugins.internal.utils import json class HighWayMe(MultiAccount): diff --git a/module/plugins/accounts/Keep2ShareCc.py b/module/plugins/accounts/Keep2ShareCc.py index 094a8ca79..2e3348efe 100644 --- a/module/plugins/accounts/Keep2ShareCc.py +++ b/module/plugins/accounts/Keep2ShareCc.py @@ -4,7 +4,7 @@ import re import time from module.plugins.internal.Account import Account -from module.plugins.internal.Plugin import set_cookie +from module.plugins.internal.utils import set_cookie class Keep2ShareCc(Account): diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index ac4c689e4..76a3b2137 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.utils import json from module.plugins.internal.MultiAccount import MultiAccount +from module.plugins.internal.utils import json class PremiumizeMe(MultiAccount): diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 1083af99f..24b7e98ca 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -3,7 +3,7 @@ import re from module.plugins.internal.Account import Account -from module.plugins.internal.Plugin import set_cookie +from module.plugins.internal.utils import set_cookie class ShareonlineBiz(Account): diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index bd86f024c..4e6014505 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.utils import json from module.plugins.internal.MultiAccount import MultiAccount -from module.plugins.internal.Plugin import set_cookie +from module.plugins.internal.utils import json, set_cookie class SimplyPremiumCom(MultiAccount): diff --git a/module/plugins/accounts/TurbobitNet.py b/module/plugins/accounts/TurbobitNet.py index c8888c862..bd4f587f1 100644 --- a/module/plugins/accounts/TurbobitNet.py +++ b/module/plugins/accounts/TurbobitNet.py @@ -4,7 +4,7 @@ import re import time from module.plugins.internal.Account import Account -from module.plugins.internal.Plugin import set_cookie +from module.plugins.internal.utils import set_cookie class TurbobitNet(Account): diff --git a/module/plugins/accounts/UploadingCom.py b/module/plugins/accounts/UploadingCom.py index c64c464da..48bc75739 100644 --- a/module/plugins/accounts/UploadingCom.py +++ b/module/plugins/accounts/UploadingCom.py @@ -4,7 +4,7 @@ import re import time from module.plugins.internal.Account import Account -from module.plugins.internal.Plugin import set_cookies +from module.plugins.internal.utils import set_cookies class UploadingCom(Account): diff --git a/module/plugins/crypter/NitroflareComFolder.py b/module/plugins/crypter/NitroflareComFolder.py index a8e0bbbc5..50f0cba4f 100644 --- a/module/plugins/crypter/NitroflareComFolder.py +++ b/module/plugins/crypter/NitroflareComFolder.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.utils import json from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo +from module.plugins.internal.utils import json class NitroflareComFolder(SimpleCrypter): diff --git a/module/plugins/hooks/AntiVirus.py b/module/plugins/hooks/AntiVirus.py index b9a7e93bf..049e92ab8 100644 --- a/module/plugins/hooks/AntiVirus.py +++ b/module/plugins/hooks/AntiVirus.py @@ -10,8 +10,7 @@ except ImportError: pass from module.plugins.internal.Addon import Addon, Expose, threaded -from module.plugins.internal.Plugin import exists -from module.plugins.internal.utils import encode, fs_join +from module.plugins.internal.utils import encode, exists, fs_join class AntiVirus(Addon): diff --git a/module/plugins/hooks/LogMarker.py b/module/plugins/hooks/LogMarker.py index 4bf8e290a..829db4d41 100644 --- a/module/plugins/hooks/LogMarker.py +++ b/module/plugins/hooks/LogMarker.py @@ -3,7 +3,7 @@ import datetime from module.plugins.internal.Addon import Addon, Expose -from module.plugins.internal.Plugin import seconds_to_nexthour +from module.plugins.internal.utils import seconds_to_nexthour class LogMarker(Addon): diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index b2f5c9648..13f8a3704 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -9,8 +9,7 @@ import sys import time from module.plugins.internal.Addon import Expose, Addon, threaded -from module.plugins.internal.Plugin import exists -from module.plugins.internal.utils import encode, fs_join +from module.plugins.internal.utils import encode, exists, fs_join class UpdateManager(Addon): diff --git a/module/plugins/hooks/UserAgentSwitcher.py b/module/plugins/hooks/UserAgentSwitcher.py index bd51b30bd..402dd001d 100644 --- a/module/plugins/hooks/UserAgentSwitcher.py +++ b/module/plugins/hooks/UserAgentSwitcher.py @@ -3,7 +3,7 @@ import pycurl from module.plugins.internal.Addon import Addon -from module.plugins.internal.Plugin import encode +from module.plugins.internal.utils import encode class UserAgentSwitcher(Addon): @@ -12,10 +12,10 @@ class UserAgentSwitcher(Addon): __version__ = "0.12" __status__ = "testing" - __config__ = [("activated" , "bool", "Activated" , True ), - ("connecttimeout", "int" , "Connection timeout in seconds" , 60 ), - ("maxredirs" , "int" , "Maximum number of redirects to follow" , 10 ), - ("useragent" , "str" , "Custom user-agent string" , "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0")] + __config__ = [("activated" , "bool", "Activated" , True ), + ("connecttimeout", "int" , "Max timeout for link connection in seconds", 60 ), + ("maxredirs" , "int" , "Maximum number of redirects to follow" , 10 ), + ("useragent" , "str" , "Custom user-agent string" , "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0")] __description__ = """Custom user-agent""" __license__ = "GPLv3" @@ -34,5 +34,5 @@ class UserAgentSwitcher(Addon): pyfile.plugin.req.http.c.setopt(pycurl.MAXREDIRS, maxredirs) if useragent: - self.log_debug("Use custom user-agent string: " + useragent) + self.log_debug("Use custom user-agent string `%s`" % useragent) pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, encode(useragent)) diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index 9e0c799a5..9e7736647 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -3,8 +3,8 @@ import re import urllib -from module.plugins.internal.utils import json from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.utils import json class FastixRu(MultiHoster): diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py index ba13c5665..876bc95f6 100644 --- a/module/plugins/hoster/FilejungleCom.py +++ b/module/plugins/hoster/FilejungleCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from module.plugins.hoster.FileserveCom import FileserveCom, check_file -from module.plugins.internal.Plugin import chunks +from module.plugins.internal.utils import chunks class FilejungleCom(FileserveCom): diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index aedd37f8f..5b183cafb 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -4,7 +4,7 @@ import re from module.network.RequestFactory import getURL as get_url from module.plugins.internal.Hoster import Hoster -from module.plugins.internal.Plugin import chunks +from module.plugins.internal.utils import chunks def get_info(urls): diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py index 809332d9a..85b2b27ec 100644 --- a/module/plugins/hoster/LinksnappyCom.py +++ b/module/plugins/hoster/LinksnappyCom.py @@ -3,8 +3,8 @@ import re import urlparse -from module.plugins.internal.utils import json from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.utils import json class LinksnappyCom(MultiHoster): diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py index fa157cc20..c4c9a973e 100644 --- a/module/plugins/hoster/MegaDebridEu.py +++ b/module/plugins/hoster/MegaDebridEu.py @@ -3,8 +3,8 @@ import re import urllib -from module.plugins.internal.utils import json from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.utils import json class MegaDebridEu(MultiHoster): diff --git a/module/plugins/hoster/MegaRapidoNet.py b/module/plugins/hoster/MegaRapidoNet.py index bc002865e..f14ff1e58 100644 --- a/module/plugins/hoster/MegaRapidoNet.py +++ b/module/plugins/hoster/MegaRapidoNet.py @@ -2,7 +2,7 @@ import random -from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo def random_with_n_digits(n): @@ -23,7 +23,7 @@ def random_with_n_digits(n): class MegaRapidoNet(MultiHoster): __name__ = "MegaRapidoNet" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?\w+\.megarapido\.net/\?file=\w+' @@ -55,3 +55,7 @@ class MegaRapidoNet(MultiHoster): self.error(_("You have logged in at another place")) return super(MegaRapidoNet, self).handle_premium(pyfile) + + +getInfo = create_getInfo(MegaRapidoNet) + diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 29b40e4c8..9aaeafe34 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -2,8 +2,8 @@ import re -from module.plugins.internal.utils import json from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.utils import json class MyfastfileCom(MultiHoster): diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 9d0b3331e..bf4c04d4c 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo from module.plugins.internal.utils import json -from module.plugins.internal.MultiHoster import MultiHoster class NoPremiumPl(MultiHoster): __name__ = "NoPremiumPl" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'https?://direct\.nopremium\.pl.+' @@ -100,3 +100,6 @@ class NoPremiumPl(MultiHoster): except Exception: self.temp_offline("Query error #2") + + +getInfo = create_getInfo(NoPremiumPl) diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py index f9f14cb3e..7afa69921 100644 --- a/module/plugins/hoster/PremiumizeMe.py +++ b/module/plugins/hoster/PremiumizeMe.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.utils import json from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.utils import json class PremiumizeMe(MultiHoster): diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index eedf1a9e4..253cdbbb0 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo from module.plugins.internal.utils import json -from module.plugins.internal.MultiHoster import MultiHoster class RapideoPl(MultiHoster): __name__ = "RapideoPl" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -100,3 +100,6 @@ class RapideoPl(MultiHoster): except Exception: self.temp_offline("Query error #2") + + +getInfo = create_getInfo(RapideoPl) diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 5dffdd3fb..cc48db4fd 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -3,7 +3,7 @@ import re from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.SimpleHoster import seconds_to_midnight +from module.plugins.internal.utils import seconds_to_midnight class SimplyPremiumCom(MultiHoster): diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index c5dad0a06..e76b7afa0 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -2,7 +2,8 @@ import re -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo, replace_patterns +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.utils import replace_patterns class SimplydebridCom(MultiHoster): diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index e1400b3bb..9f84edfec 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo from module.plugins.internal.utils import json -from module.plugins.internal.MultiHoster import MultiHoster class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" - __version__ = "0.10" + __version__ = "0.11" __status__ = "testing" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate @@ -61,3 +61,6 @@ class SmoozedCom(MultiHoster): self.fail(_("Unable to initialize download")) else: self.link = header.get('location')[-1] if isinstance(header.get('location'), list) else header.get('location') + + +getInfo = create_getInfo(SmoozedCom) diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index e6a7bd720..e174962cb 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -10,8 +10,8 @@ import urllib from Crypto.Cipher import ARC4 from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.Plugin import timestamp from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.utils import timestamp class TurbobitNet(SimpleHoster): diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 5069e3f5b..a2363bea1 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -3,9 +3,8 @@ import re import time -from module.plugins.internal.utils import json -from module.plugins.internal.Plugin import timestamp from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.utils import json, timestamp def convert_decimal_prefix(m): diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index 5f888b7b2..7b3395be4 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -3,9 +3,8 @@ import pycurl import re -from module.plugins.internal.utils import json -from module.plugins.internal.Plugin import encode, timestamp from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.utils import encode, json, timestamp class UploadingCom(SimpleHoster): diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 5563ec12e..fde0b4a41 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -6,8 +6,7 @@ import subprocess import urllib from module.plugins.internal.Hoster import Hoster -from module.plugins.internal.Plugin import replace_patterns, which -from module.plugins.internal.utils import html_unescape +from module.plugins.internal.utils import html_unescape, replace_patterns, which class YoutubeCom(Hoster): diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 75a496f65..18e92c2d2 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -9,7 +9,7 @@ from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getURL as get_url from module.plugins.internal.Hoster import Hoster, create_getInfo, parse_fileInfo from module.plugins.internal.Plugin import Fail -from module.plugins.internal.utils import (encode, fixup, parse_name, parse_size, +from module.plugins.internal.utils import (encode, parse_name, parse_size, parse_time, replace_patterns, seconds_to_midnight, set_cookie, set_cookies) |