From 4a567fcddf6fdd4c2787f9d0153bfdb176993d15 Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 8 Jun 2013 14:41:37 +0200 Subject: EasybytezCom: fixed coversion feature and updated regex http://forum.pyload.org/viewtopic.php?p=9597#p9597 --- module/plugins/hoster/EasybytezCom.py | 2 +- module/plugins/hoster/XFileSharingPro.py | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index a13491ad2..0f18448f5 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -31,7 +31,7 @@ class EasybytezCom(XFileSharingPro): FILE_INFO_PATTERN = r'

Download File (?P.+)

\s*]+>You have requested [^<]+ \((?P.+)\)' FILE_OFFLINE_PATTERN = r'

File not available

' - DIRECT_LINK_PATTERN = r'(http://(\w+\.(easybytez|zingload)\.com|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)' + DIRECT_LINK_PATTERN = r'(http://(\w+\.(easyload|easybytez|zingload)\.(com|to)|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)' OVR_DOWNLOAD_LINK_PATTERN = r'

Download Link

\s*]*>([^<]+)' OVR_KILL_LINK_PATTERN = r'

Delete Link

\s*]*>([^<]+)' ERROR_PATTERN = r'(?:class=["\']err["\'][^>]*>|
)(.*?)[^"]+)"' FILE_SIZE_PATTERN = r'You have requested [^<]+ \((?P[^<]+)\)' @@ -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) -- cgit v1.2.3