From 358db22de830b6976d085b7f44fb6058816eb5a1 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Mon, 10 Sep 2012 23:56:19 +0200 Subject: fix turbobit with ossp-js, ryushare, easybytez - thx trance4us, ChriZathens --- module/plugins/hoster/TurbobitNet.py | 16 ++++++++++------ module/plugins/hoster/XFileSharingPro.py | 6 ++++-- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index 2a65c1b00..b3b01c92b 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -35,7 +35,7 @@ class TurbobitNet(SimpleHoster): __name__ = "TurbobitNet" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?(turbobit.net|unextfiles.com)/(?:download/free/)?(?P\w+).*" - __version__ = "0.06" + __version__ = "0.07" __description__ = """Turbobit.net plugin""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -106,9 +106,11 @@ class TurbobitNet(SimpleHoster): if self.getStorage("version") != self.__version__ or int(self.getStorage("timestamp", 0)) + 86400000 < timestamp(): # that's right, we are even using jdownloader updates rtUpdate = getURL("http://update0.jdownloader.org/pluginstuff/tbupdate.js") - rtUpdate = self.decrypt(rtUpdate.splitlines()[1]) - rtUpdate = rtUpdate.replace("for each(var ss in[2,4,5,6]){inn+=s[ss]}", "inn+=s[2]+s[4]+s[5]+s[6]") - + rtUpdate = self.decrypt(rtUpdate.splitlines()[1]) + # but we still need to fix the syntax to work with other engines than rhino + rtUpdate = re.sub(r'for each\(var (\w+) in(\[[^\]]+\])\)\{',r'zza=\2;for(var zzi=0;zzi= 2: + # retry with updated js + self.delStorage("rtUpdate") self.retry() def decrypt(self, data): diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index 36874b798..8e213e9bf 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -34,7 +34,7 @@ class XFileSharingPro(SimpleHoster): __name__ = "XFileSharingPro" __type__ = "hoster" __pattern__ = r"^unmatchable$" - __version__ = "0.10" + __version__ = "0.11" __description__ = """XFileSharingPro common hoster base""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -78,6 +78,8 @@ class XFileSharingPro(SimpleHoster): self.file_info = self.getFileInfo() except PluginParseError: self.file_info = None + + self.req.http.lastURL = self.pyfile.url self.req.http.c.setopt(FOLLOWLOCATION, 0) self.html = self.load(self.pyfile.url, cookies = True, decode = True) @@ -87,7 +89,7 @@ class XFileSharingPro(SimpleHoster): self.location = None found = re.search("Location\s*:\s*(.*)", self.header, re.I) if found and re.match(self.DIRECT_LINK_PATTERN, found.group(1)): - self.location = found.group(1) + self.location = found.group(1).strip() if not self.file_info: pyfile.name = html_unescape(unquote(urlparse(self.location if self.location else pyfile.url).path.split("/")[-1])) -- cgit v1.2.3