summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/XFileSharingPro.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-28 16:27:29 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-28 16:27:29 +0200
commit2e4101c6b373867d556a410901efb8c85c56593f (patch)
tree6aa8884afa3e5a46a8eb2ac547329c91ffcc9a9d /module/plugins/hoster/XFileSharingPro.py
parent[XFileSharingPro] COOKIES preset to english + improved setup routine (diff)
downloadpyload-2e4101c6b373867d556a410901efb8c85c56593f.tar.xz
Prepare method improves setup one
Diffstat (limited to 'module/plugins/hoster/XFileSharingPro.py')
-rw-r--r--module/plugins/hoster/XFileSharingPro.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py
index 0c4a7cb97..cd53c98b0 100644
--- a/module/plugins/hoster/XFileSharingPro.py
+++ b/module/plugins/hoster/XFileSharingPro.py
@@ -21,13 +21,13 @@ class XFileSharingPro(SimpleHoster):
"""
__name__ = "XFileSharingPro"
__type__ = "hoster"
- __version__ = "0.34"
+ __version__ = "0.35"
__pattern__ = r'^unmatchable$'
__description__ = """XFileSharingPro base hoster plugin"""
- __author_name__ = ("zoidberg", "stickell")
- __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
+ __author_name__ = ("zoidberg", "stickell", "Walter Purcaro")
+ __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it", "vuolter@gmail.com")
HOSTER_NAME = None
@@ -65,8 +65,12 @@ class XFileSharingPro(SimpleHoster):
self.COOKIES = [(self.HOSTER_NAME, "lang", "english")]
else:
self.resumeDownload = self.multiDL = self.premium
- if not self.HOSTER_NAME:
- self.fail("Missing HOSTER_NAME")
+
+
+ def prepare(self):
+ """ Initialize important variables """
+ if not self.HOSTER_NAME:
+ self.fail("Missing HOSTER_NAME")
if not LINK_PATTERN:
pattr = r'(http://([^/]*?%s|\d+\.\d+\.\d+\.\d+)(:\d+)?(/d/|(?:/files)?/\d+/\w+/)[^"\'<]+)'
@@ -75,6 +79,10 @@ class XFileSharingPro(SimpleHoster):
if isinstance(self.COOKIES, list):
set_cookies(self.req.cj, self.COOKIES)
+ self.captcha = None
+ self.errmsg = None
+ self.passwords = self.getPassword().splitlines()
+
def process(self, pyfile):
self.prepare()
@@ -110,13 +118,6 @@ class XFileSharingPro(SimpleHoster):
self.handleFree()
- def prepare(self):
- """ Initialize important variables """
- self.captcha = None
- self.errmsg = None
- self.passwords = self.getPassword().splitlines()
-
-
def getDirectDownloadLink(self):
""" Get download link for premium users with direct download enabled """
self.req.http.lastURL = self.pyfile.url