diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 09:22:01 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 09:22:01 +0200 |
commit | 2432ade6c9bd7284a5bf0d760796638eef634be9 (patch) | |
tree | 877cfd29c6e5117a974377ead73cbbc150f6544d /module/plugins/hooks | |
parent | Prepare hook plugins to merging from stable (diff) | |
parent | [LolabitsEs] Cleanup (diff) | |
download | pyload-2432ade6c9bd7284a5bf0d760796638eef634be9.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/hooks/MultihostersComHook.py
module/plugins/hooks/PutdriveComHook.py
module/plugins/internal/CaptchaService.py
pyload/plugin/account/OboomCom.py
pyload/plugin/account/SmoozedCom.py
pyload/plugin/addon/AntiVirus.py
pyload/plugin/addon/ExternalScripts.py
pyload/plugin/addon/ExtractArchive.py
pyload/plugin/addon/RestartSlow.py
pyload/plugin/crypter/CrockoCom.py
pyload/plugin/crypter/DepositfilesCom.py
pyload/plugin/crypter/FshareVn.py
pyload/plugin/crypter/LinkdecrypterCom.py
pyload/plugin/crypter/MegaRapidCz.py
pyload/plugin/crypter/PastebinCom.py
pyload/plugin/hoster/CatShareNet.py
pyload/plugin/hoster/EdiskCz.py
pyload/plugin/hoster/ExtabitCom.py
pyload/plugin/hoster/GigapetaCom.py
pyload/plugin/hoster/GooIm.py
pyload/plugin/hoster/IfolderRu.py
pyload/plugin/hoster/LuckyShareNet.py
pyload/plugin/hoster/MegasharesCom.py
pyload/plugin/hoster/MovReelCom.py
pyload/plugin/hoster/NarodRu.py
pyload/plugin/hoster/NowDownloadSx.py
pyload/plugin/hoster/NowVideoSx.py
pyload/plugin/hoster/QuickshareCz.py
pyload/plugin/hoster/RemixshareCom.py
pyload/plugin/hoster/RgHostNet.py
pyload/plugin/hoster/SendspaceCom.py
pyload/plugin/hoster/UlozTo.py
pyload/plugin/hoster/UnibytesCom.py
pyload/plugin/hoster/UploadingCom.py
pyload/plugin/hoster/WrzucTo.py
pyload/plugin/internal/MultiHook.py
pyload/plugin/internal/SimpleHoster.py
Diffstat (limited to 'module/plugins/hooks')
25 files changed, 102 insertions, 54 deletions
diff --git a/module/plugins/hooks/AlldebridComHook.py b/module/plugins/hooks/AlldebridComHook.py index 3d05fb761..367181aa4 100644 --- a/module/plugins/hooks/AlldebridComHook.py +++ b/module/plugins/hooks/AlldebridComHook.py @@ -3,8 +3,8 @@ from pyload.plugin.internal.MultiHook import MultiHook -class AlldebridCom(MultiHook): - __name__ = "AlldebridCom" +class AlldebridComHook(MultiHook): + __name__ = "AlldebridComHook" __type__ = "hook" __version__ = "0.16" diff --git a/module/plugins/hooks/DebridItaliaComHook.py b/module/plugins/hooks/DebridItaliaComHook.py index e7760ba5a..c1452b520 100644 --- a/module/plugins/hooks/DebridItaliaComHook.py +++ b/module/plugins/hooks/DebridItaliaComHook.py @@ -5,8 +5,8 @@ import re from pyload.plugin.internal.MultiHook import MultiHook -class DebridItaliaCom(MultiHook): - __name__ = "DebridItaliaCom" +class DebridItaliaComHook(MultiHook): + __name__ = "DebridItaliaComHook" __type__ = "hook" __version__ = "0.12" diff --git a/module/plugins/hooks/EasybytezComHook.py b/module/plugins/hooks/EasybytezComHook.py index 79640a367..2f4ed72a8 100644 --- a/module/plugins/hooks/EasybytezComHook.py +++ b/module/plugins/hooks/EasybytezComHook.py @@ -5,8 +5,8 @@ import re from pyload.plugin.internal.MultiHook import MultiHook -class EasybytezCom(MultiHook): - __name__ = "EasybytezCom" +class EasybytezComHook(MultiHook): + __name__ = "EasybytezComHook" __type__ = "hook" __version__ = "0.07" diff --git a/module/plugins/hooks/FastixRuHook.py b/module/plugins/hooks/FastixRuHook.py index d0e2ff2fd..4e03e887b 100644 --- a/module/plugins/hooks/FastixRuHook.py +++ b/module/plugins/hooks/FastixRuHook.py @@ -4,8 +4,8 @@ from pyload.utils import json_loads from pyload.plugin.internal.MultiHook import MultiHook -class FastixRu(MultiHook): - __name__ = "FastixRu" +class FastixRuHook(MultiHook): + __name__ = "FastixRuHook" __type__ = "hook" __version__ = "0.05" diff --git a/module/plugins/hooks/FreeWayMeHook.py b/module/plugins/hooks/FreeWayMeHook.py index 086824550..c498725f5 100644 --- a/module/plugins/hooks/FreeWayMeHook.py +++ b/module/plugins/hooks/FreeWayMeHook.py @@ -3,8 +3,8 @@ from pyload.plugin.internal.MultiHook import MultiHook -class FreeWayMe(MultiHook): - __name__ = "FreeWayMe" +class FreeWayMeHook(MultiHook): + __name__ = "FreeWayMeHook" __type__ = "hook" __version__ = "0.15" diff --git a/module/plugins/hooks/LinkdecrypterComHook.py b/module/plugins/hooks/LinkdecrypterComHook.py index ab1e662dc..d8c0018c9 100644 --- a/module/plugins/hooks/LinkdecrypterComHook.py +++ b/module/plugins/hooks/LinkdecrypterComHook.py @@ -5,15 +5,16 @@ import re from pyload.plugin.internal.MultiHook import MultiHook -class LinkdecrypterCom(MultiHook): - __name__ = "LinkdecrypterCom" +class LinkdecrypterComHook(MultiHook): + __name__ = "LinkdecrypterComHook" __type__ = "hook" - __version__ = "1.03" + __version__ = "1.04" - __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), - ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ), - ("reload" , "bool" , "Reload plugin list" , True ), - ("reloadinterval", "int" , "Reload interval in hours" , 12 )] + __config__ = [("activated" , "bool" , "Activated" , True ), + ("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), + ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), + ("reload" , "bool" , "Reload plugin list" , True ), + ("reloadinterval", "int" , "Reload interval in hours" , 12 )] __description__ = """Linkdecrypter.com hook plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hooks/LinksnappyComHook.py b/module/plugins/hooks/LinksnappyComHook.py index 7eddc5811..22b958b31 100644 --- a/module/plugins/hooks/LinksnappyComHook.py +++ b/module/plugins/hooks/LinksnappyComHook.py @@ -4,8 +4,8 @@ from pyload.utils import json_loads from pyload.plugin.internal.MultiHook import MultiHook -class LinksnappyCom(MultiHook): - __name__ = "LinksnappyCom" +class LinksnappyComHook(MultiHook): + __name__ = "LinksnappyComHook" __type__ = "hook" __version__ = "0.04" diff --git a/module/plugins/hooks/MegaDebridEuHook.py b/module/plugins/hooks/MegaDebridEuHook.py index e373a544b..1d086b9d1 100644 --- a/module/plugins/hooks/MegaDebridEuHook.py +++ b/module/plugins/hooks/MegaDebridEuHook.py @@ -4,8 +4,8 @@ from pyload.utils import json_loads from pyload.plugin.internal.MultiHook import MultiHook -class MegaDebridEu(MultiHook): - __name__ = "MegaDebridEu" +class MegaDebridEuHook(MultiHook): + __name__ = "MegaDebridEuHook" __type__ = "hook" __version__ = "0.05" diff --git a/module/plugins/hooks/MegaRapidoNetHook.py b/module/plugins/hooks/MegaRapidoNetHook.py index 2f660c939..1fe8d4923 100644 --- a/module/plugins/hooks/MegaRapidoNetHook.py +++ b/module/plugins/hooks/MegaRapidoNetHook.py @@ -5,8 +5,8 @@ import re from pyload.plugin.internal.MultiHook import MultiHook -class MegaRapidoNet(MultiHook): - __name__ = "MegaRapidoNet" +class MegaRapidoNetHook(MultiHook): + __name__ = "MegaRapidoNetHook" __type__ = "hook" __version__ = "0.02" diff --git a/module/plugins/hooks/MultishareCzHook.py b/module/plugins/hooks/MultishareCzHook.py index 21e200584..70cc8d7a9 100644 --- a/module/plugins/hooks/MultishareCzHook.py +++ b/module/plugins/hooks/MultishareCzHook.py @@ -5,8 +5,8 @@ import re from pyload.plugin.internal.MultiHook import MultiHook -class MultishareCz(MultiHook): - __name__ = "MultishareCz" +class MultishareCzHook(MultiHook): + __name__ = "MultishareCzHook" __type__ = "hook" __version__ = "0.07" @@ -21,7 +21,7 @@ class MultishareCz(MultiHook): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - HOSTER_PATTERN = r'<img class="logo-shareserveru"[^>]*?alt="([^"]+)"></td>\s*<td class="stav">[^>]*?alt="OK"' + HOSTER_PATTERN = r'<img class="logo-shareserveru"[^>]*?alt="(.+?)"></td>\s*<td class="stav">[^>]*?alt="OK"' def getHosters(self): diff --git a/module/plugins/hooks/MyfastfileComHook.py b/module/plugins/hooks/MyfastfileComHook.py index 3149e832c..a9438f400 100644 --- a/module/plugins/hooks/MyfastfileComHook.py +++ b/module/plugins/hooks/MyfastfileComHook.py @@ -4,8 +4,8 @@ from pyload.plugin.internal.MultiHook import MultiHook from pyload.utils import json_loads -class MyfastfileCom(MultiHook): - __name__ = "MyfastfileCom" +class MyfastfileComHook(MultiHook): + __name__ = "MyfastfileComHook" __type__ = "hook" __version__ = "0.05" diff --git a/module/plugins/hooks/NoPremiumPlHook.py b/module/plugins/hooks/NoPremiumPlHook.py index 93c5b8d1e..743f18fc0 100644 --- a/module/plugins/hooks/NoPremiumPlHook.py +++ b/module/plugins/hooks/NoPremiumPlHook.py @@ -4,8 +4,8 @@ from pyload.utils import json_loads from pyload.plugin.internal.MultiHook import MultiHook -class NoPremiumPl(MultiHook): - __name__ = "NoPremiumPl" +class NoPremiumPlHook(MultiHook): + __name__ = "NoPremiumPlHook" __type__ = "hook" __version__ = "0.03" diff --git a/module/plugins/hooks/OverLoadMeHook.py b/module/plugins/hooks/OverLoadMeHook.py index 6db7c1fa2..58d419416 100644 --- a/module/plugins/hooks/OverLoadMeHook.py +++ b/module/plugins/hooks/OverLoadMeHook.py @@ -3,8 +3,8 @@ from pyload.plugin.internal.MultiHook import MultiHook -class OverLoadMe(MultiHook): - __name__ = "OverLoadMe" +class OverLoadMeHook(MultiHook): + __name__ = "OverLoadMeHook" __type__ = "hook" __version__ = "0.04" diff --git a/module/plugins/hooks/PremiumToHook.py b/module/plugins/hooks/PremiumToHook.py index 51e801c4f..8cd2ef0e5 100644 --- a/module/plugins/hooks/PremiumToHook.py +++ b/module/plugins/hooks/PremiumToHook.py @@ -3,8 +3,8 @@ from pyload.plugin.internal.MultiHook import MultiHook -class PremiumTo(MultiHook): - __name__ = "PremiumTo" +class PremiumToHook(MultiHook): + __name__ = "PremiumToHook" __type__ = "hook" __version__ = "0.08" diff --git a/module/plugins/hooks/PremiumizeMeHook.py b/module/plugins/hooks/PremiumizeMeHook.py index 209db7c75..1b6444f00 100644 --- a/module/plugins/hooks/PremiumizeMeHook.py +++ b/module/plugins/hooks/PremiumizeMeHook.py @@ -4,8 +4,8 @@ from pyload.utils import json_loads from pyload.plugin.internal.MultiHook import MultiHook -class PremiumizeMe(MultiHook): - __name__ = "PremiumizeMe" +class PremiumizeMeHook(MultiHook): + __name__ = "PremiumizeMeHook" __type__ = "hook" __version__ = "0.17" diff --git a/module/plugins/hooks/RPNetBizHook.py b/module/plugins/hooks/RPNetBizHook.py index e8afb4fc0..c7893ef46 100644 --- a/module/plugins/hooks/RPNetBizHook.py +++ b/module/plugins/hooks/RPNetBizHook.py @@ -4,8 +4,8 @@ from pyload.utils import json_loads from pyload.plugin.internal.MultiHook import MultiHook -class RPNetBiz(MultiHook): - __name__ = "RPNetBiz" +class RPNetBizHook(MultiHook): + __name__ = "RPNetBizHook" __type__ = "hook" __version__ = "0.14" diff --git a/module/plugins/hooks/RapideoPlHook.py b/module/plugins/hooks/RapideoPlHook.py index 74bad2cfd..dd68fb244 100644 --- a/module/plugins/hooks/RapideoPlHook.py +++ b/module/plugins/hooks/RapideoPlHook.py @@ -4,8 +4,8 @@ from pyload.utils import json_loads from pyload.plugin.internal.MultiHook import MultiHook -class RapideoPl(MultiHook): - __name__ = "RapideoPl" +class RapideoPlHook(MultiHook): + __name__ = "RapideoPlHook" __type__ = "hook" __version__ = "0.03" diff --git a/module/plugins/hooks/RealdebridComHook.py b/module/plugins/hooks/RealdebridComHook.py index 74a114105..6399d6dc2 100644 --- a/module/plugins/hooks/RealdebridComHook.py +++ b/module/plugins/hooks/RealdebridComHook.py @@ -3,8 +3,8 @@ from pyload.plugin.internal.MultiHook import MultiHook -class RealdebridCom(MultiHook): - __name__ = "RealdebridCom" +class RealdebridComHook(MultiHook): + __name__ = "RealdebridComHook" __type__ = "hook" __version__ = "0.46" diff --git a/module/plugins/hooks/RehostToHook.py b/module/plugins/hooks/RehostToHook.py index 69978edaa..b55f4cdb7 100644 --- a/module/plugins/hooks/RehostToHook.py +++ b/module/plugins/hooks/RehostToHook.py @@ -3,8 +3,8 @@ from pyload.plugin.internal.MultiHook import MultiHook -class RehostTo(MultiHook): - __name__ = "RehostTo" +class RehostToHook(MultiHook): + __name__ = "RehostToHook" __type__ = "hook" __version__ = "0.50" diff --git a/module/plugins/hooks/SimplyPremiumComHook.py b/module/plugins/hooks/SimplyPremiumComHook.py index 9f696666f..ee125cbf6 100644 --- a/module/plugins/hooks/SimplyPremiumComHook.py +++ b/module/plugins/hooks/SimplyPremiumComHook.py @@ -4,8 +4,8 @@ from pyload.utils import json_loads from pyload.plugin.internal.MultiHook import MultiHook -class SimplyPremiumCom(MultiHook): - __name__ = "SimplyPremiumCom" +class SimplyPremiumComHook(MultiHook): + __name__ = "SimplyPremiumComHook" __type__ = "hook" __version__ = "0.05" diff --git a/module/plugins/hooks/SimplydebridComHook.py b/module/plugins/hooks/SimplydebridComHook.py index 74eba106e..2e9da87bd 100644 --- a/module/plugins/hooks/SimplydebridComHook.py +++ b/module/plugins/hooks/SimplydebridComHook.py @@ -3,8 +3,8 @@ from pyload.plugin.internal.MultiHook import MultiHook -class SimplydebridCom(MultiHook): - __name__ = "SimplydebridCom" +class SimplydebridComHook(MultiHook): + __name__ = "SimplydebridComHook" __type__ = "hook" __version__ = "0.04" diff --git a/module/plugins/hooks/SmoozedComHook.py b/module/plugins/hooks/SmoozedComHook.py index 37c0d9bcb..786f85491 100644 --- a/module/plugins/hooks/SmoozedComHook.py +++ b/module/plugins/hooks/SmoozedComHook.py @@ -3,8 +3,8 @@ from pyload.plugin.internal.MultiHook import MultiHook -class SmoozedCom(MultiHook): - __name__ = "SmoozedCom" +class SmoozedComHook(MultiHook): + __name__ = "SmoozedComHook" __type__ = "hook" __version__ = "0.03" diff --git a/module/plugins/hooks/UnrestrictLiHook.py b/module/plugins/hooks/UnrestrictLiHook.py index a0fb53004..8f9bdaaf5 100644 --- a/module/plugins/hooks/UnrestrictLiHook.py +++ b/module/plugins/hooks/UnrestrictLiHook.py @@ -4,8 +4,8 @@ from pyload.utils import json_loads from pyload.plugin.internal.MultiHook import MultiHook -class UnrestrictLi(MultiHook): - __name__ = "UnrestrictLi" +class UnrestrictLiHook(MultiHook): + __name__ = "UnrestrictLiHook" __type__ = "hook" __version__ = "0.05" diff --git a/module/plugins/hooks/UserAgentSwitcher.py b/module/plugins/hooks/UserAgentSwitcher.py new file mode 100644 index 000000000..912c2ef09 --- /dev/null +++ b/module/plugins/hooks/UserAgentSwitcher.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- + +from __future__ import with_statement + +import os +import pycurl +import random + +from module.plugins.Hook import Hook +from module.utils import fs_encode + + +class UserAgentSwitcher(Hook): + __name__ = "UserAgentSwitcher" + __type__ = "hook" + __version__ = "0.04" + + __config__ = [("activated", "bool", "Activated" , True ), + ("uaf" , "file", "Random user-agents file" , "" ), + ("uar" , "bool", "Random user-agent" , False ), + ("uas" , "str" , "Custom user-agent string", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0")] + + __description__ = """Custom user-agent""" + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + + + interval = 0 #@TODO: Remove in 0.4.10 + + + def setup(self): + self.info = {} #@TODO: Remove in 0.4.10 + + + def downloadPreparing(self, pyfile): + uar = self.getConfig('uar') + uaf = fs_encode(self.getConfig('uaf')) + + if uar and os.path.isfile(uaf): + with open(uaf) as f: + uas = random.choice([ua for ua in f.read().splitlines()]) + else: + uas = self.getConfig('uas') + + if uas: + self.logDebug("Use custom user-agent string: " + uas) + pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, uas.encode('utf-8')) diff --git a/module/plugins/hooks/ZeveraComHook.py b/module/plugins/hooks/ZeveraComHook.py index 0ca2e72d2..83723351e 100644 --- a/module/plugins/hooks/ZeveraComHook.py +++ b/module/plugins/hooks/ZeveraComHook.py @@ -3,8 +3,8 @@ from pyload.plugin.internal.MultiHook import MultiHook -class ZeveraCom(MultiHook): - __name__ = "ZeveraCom" +class ZeveraComHook(MultiHook): + __name__ = "ZeveraComHook" __type__ = "hook" __version__ = "0.05" |