diff options
author | Stefano <l.stickell@yahoo.it> | 2013-06-08 14:41:37 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-06-08 14:41:37 +0200 |
commit | 4a567fcddf6fdd4c2787f9d0153bfdb176993d15 (patch) | |
tree | 5d49611b71674eea9980d58ed865954f8c60a025 /module/plugins/hoster/XFileSharingPro.py | |
parent | EasybytezCom: updated regex (diff) | |
download | pyload-4a567fcddf6fdd4c2787f9d0153bfdb176993d15.tar.xz |
EasybytezCom: fixed coversion feature and updated regex
http://forum.pyload.org/viewtopic.php?p=9597#p9597
Diffstat (limited to 'module/plugins/hoster/XFileSharingPro.py')
-rw-r--r-- | module/plugins/hoster/XFileSharingPro.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index 1120a2a8b..2103b0c20 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -23,7 +23,7 @@ from urlparse import urlparse from pycurl import FOLLOWLOCATION, LOW_SPEED_TIME from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, PluginParseError from module.plugins.ReCaptcha import ReCaptcha -from module.plugins.internal.CaptchaService import SolveMedia, AdsCaptcha +from module.plugins.internal.CaptchaService import SolveMedia from module.utils import html_unescape class XFileSharingPro(SimpleHoster): @@ -35,10 +35,10 @@ class XFileSharingPro(SimpleHoster): __name__ = "XFileSharingPro" __type__ = "hoster" __pattern__ = r"^unmatchable$" - __version__ = "0.17" + __version__ = "0.18" __description__ = """XFileSharingPro common hoster base""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") FILE_NAME_PATTERN = r'<input type="hidden" name="fname" value="(?P<N>[^"]+)"' FILE_SIZE_PATTERN = r'You have requested <font color="red">[^<]+</font> \((?P<S>[^<]+)\)</font>' @@ -151,7 +151,8 @@ class XFileSharingPro(SimpleHoster): def handlePremium(self): self.html = self.load(self.pyfile.url, post = self.getPostParameters()) found = re.search(self.DIRECT_LINK_PATTERN, self.html) - if not found: self.parseError('DIRECT LINK') + if not found: + self.parseError('DIRECT LINK') self.startDownload(found.group(1)) def handleOverriden(self): @@ -183,13 +184,17 @@ class XFileSharingPro(SimpleHoster): found = re.search(self.OVR_DOWNLOAD_LINK_PATTERN, self.html) if not found: self.parseError('DIRECT LINK (OVR)') self.pyfile.url = found.group(1) - self.retry() + header = self.load(self.pyfile.url, just_header=True) + if 'location' in header: # Direct link + self.startDownload(self.pyfile.url) + else: + self.retry() def startDownload(self, link): link = link.strip() if self.captcha: self.correctCaptcha() self.logDebug('DIRECT LINK: %s' % link) - self.download(link) + self.download(link, disposition=True) def checkErrors(self): found = re.search(self.ERROR_PATTERN, self.html) |