summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/internal/MultiHoster.py12
-rw-r--r--module/plugins/internal/XFSHoster.py10
2 files changed, 11 insertions, 11 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index d50b82ce0..eb127f57c 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -2,14 +2,15 @@
import re
-from module.plugins.internal.Plugin import Fail, encode
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns, set_cookie, set_cookies
+from module.plugins.internal.Plugin import Fail
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+from module.plugins.internal.utils import encode, replace_patterns, set_cookie, set_cookies
class MultiHoster(SimpleHoster):
__name__ = "MultiHoster"
__type__ = "hoster"
- __version__ = "0.57"
+ __version__ = "0.58"
__status__ = "stable"
__pattern__ = r'^unmatchable$'
@@ -26,6 +27,7 @@ class MultiHoster(SimpleHoster):
PLUGIN_NAME = None
+ DIRECT_LINK = None
LEECH_HOSTER = False
LOGIN_ACCOUNT = True
@@ -47,9 +49,7 @@ class MultiHoster(SimpleHoster):
#@TODO: Recheck in 0.4.10
def setup_base(self):
- plugin = self.pyload.pluginManager.hosterPlugins[self.classname]
- klass = getattr(plugin['module'], plugin['name'])
-
+ klass = self.pyload.pluginManager.loadClass("hoster", self.classname)
self.get_info = klass.get_info
super(MultiHoster, self).setup_base()
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py
index 293b01c4b..f63ee8755 100644
--- a/module/plugins/internal/XFSHoster.py
+++ b/module/plugins/internal/XFSHoster.py
@@ -5,15 +5,14 @@ import re
from module.plugins.captcha.ReCaptcha import ReCaptcha
from module.plugins.captcha.SolveMedia import SolveMedia
-from module.plugins.internal.Plugin import set_cookie
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-from module.plugins.internal.utils import html_unescape, seconds_to_midnight
+from module.plugins.internal.utils import html_unescape, seconds_to_midnight, set_cookie
class XFSHoster(SimpleHoster):
__name__ = "XFSHoster"
__type__ = "hoster"
- __version__ = "0.68"
+ __version__ = "0.69"
__status__ = "stable"
__pattern__ = r'^unmatchable$'
@@ -31,6 +30,7 @@ class XFSHoster(SimpleHoster):
PLUGIN_DOMAIN = None
+ DIRECT_LINK = None
LEECH_HOSTER = True #@NOTE: hould be set to `False` by default for safe, but I am lazy...
NAME_PATTERN = r'(Filename[ ]*:[ ]*</b>(</td><td nowrap>)?|name="fname"[ ]+value="|<[\w^_]+ class="(file)?name">)\s*(?P<N>.+?)(\s*<|")'
@@ -98,7 +98,7 @@ class XFSHoster(SimpleHoster):
if m is not None:
break
- data = self.get_post_parameters()
+ data = self._post_parameters()
self.html = self.load(pyfile.url, post=data, redirect=False)
@@ -175,7 +175,7 @@ class XFSHoster(SimpleHoster):
self.link = header.get('location')
- def get_post_parameters(self):
+ def _post_parameters(self):
if self.FORM_PATTERN or self.FORM_INPUTS_MAP:
action, inputs = self.parse_html_form(self.FORM_PATTERN or "", self.FORM_INPUTS_MAP or {})
else: