diff options
| -rw-r--r-- | module/plugins/accounts/RyushareCom.py | 3 | ||||
| -rw-r--r-- | module/plugins/hoster/TurbobitNet.py | 16 | ||||
| -rw-r--r-- | module/plugins/hoster/XFileSharingPro.py | 6 | 
3 files changed, 16 insertions, 9 deletions
| diff --git a/module/plugins/accounts/RyushareCom.py b/module/plugins/accounts/RyushareCom.py index 055680ea0..f734eb11b 100644 --- a/module/plugins/accounts/RyushareCom.py +++ b/module/plugins/accounts/RyushareCom.py @@ -3,7 +3,7 @@ from module.plugins.internal.XFSPAccount import XFSPAccount  class RyushareCom(XFSPAccount):      __name__ = "RyushareCom" -    __version__ = "0.02" +    __version__ = "0.03"      __type__ = "account"      __description__ = """ryushare.com account plugin"""      __author_name__ = ("zoidberg", "trance4us") @@ -12,6 +12,7 @@ class RyushareCom(XFSPAccount):      MAIN_PAGE = "http://ryushare.com/"      def login(self, user, data, req): +        req.lastURL = "http://ryushare.com/login.python"          html = req.load("http://ryushare.com/login.python", post={"login": user, "password": data["password"], "op": "login"})          if 'Incorrect Login or Password' in html or '>Error<' in html:                        self.wrongPassword()
\ No newline at end of file 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<ID>\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<zza.length;zzi++){\1=zza[zzi];',rtUpdate) +                rtUpdate = re.sub(r"for\((\w+)=",r"for(var \1=", rtUpdate) +                                  self.logDebug("rtUpdate")                  self.setStorage("rtUpdate", rtUpdate)                  self.setStorage("timestamp", timestamp()) @@ -133,13 +135,15 @@ class TurbobitNet(SimpleHoster):              try:                  out = self.js.eval(self.jscode) +                self.logDebug("URL", self.js.engine, out)                  if out.startswith('/download/'):                      return "http://turbobit.net%s" % out.strip()              except Exception, e:                  self.logError(e)          else: -            # retry with updated js -            self.delStorage("rtUpdate") +            if self.retries >= 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])) | 
