diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-11-01 21:02:38 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-11-01 21:02:38 +0100 |
commit | a9400a640050d8152685391c84748f5f478c4c31 (patch) | |
tree | 1a373c1b40a7490fe5dba3cbac421b6f1018d846 /module/plugins | |
parent | add hoster load.to (diff) | |
download | pyload-a9400a640050d8152685391c84748f5f478c4c31.tar.xz |
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hoster/BasePlugin.py | 7 | ||||
-rw-r--r-- | module/plugins/hoster/LoadTo.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 095d2644e..428afeee4 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -1,15 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import re from module.plugins.Hoster import Hoster from module.utils import html_unescape +from urlparse import urlparse + class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" __pattern__ = r"^unmatchable$" - __version__ = "0.11" + __version__ = "0.12" __description__ = """Base Plugin when any other didnt fit""" __author_name__ = ("RaNaN") __author_mail__ = ("RaNaN@pyload.org") @@ -39,7 +40,7 @@ class BasePlugin(Hoster): # return if pyfile.url.startswith("http"): - pyfile.name = html_unescape(re.findall("([^/=]+)", pyfile.url)[-1]) + pyfile.name = html_unescape(urlparse(pyfile.url).path.split("/")[-1]) self.download(pyfile.url, disposition=True) else: diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 0cc5ef59a..b1204cb2d 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -66,7 +66,7 @@ class LoadTo(Hoster): timmy = re.search(self.WAIT_PATTERN, self.html) if timmy: - self.setWait(timmy.group(1), True) + self.setWait(timmy.group(1)) self.wait() found = re.search(self.FILE_NAME_PATTERN, self.html) diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index c9aba7898..0d927c525 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -50,7 +50,7 @@ class RapidshareCom(Hoster): __name__ = "RapidshareCom" __type__ = "hoster" __pattern__ = r"https?://[\w\.]*?rapidshare.com/(?:files/(?P<id>\d*?)/(?P<name>[^?]+)|#!download\|(?:\w+)\|(?P<id_new>\d+)\|(?P<name_new>[^|]+))" - __version__ = "1.36" + __version__ = "1.37" __description__ = """Rapidshare.com Download Hoster""" __config__ = [["server", "Cogent;Deutsche Telekom;Level(3);Level(3) #2;GlobalCrossing;Level(3) #3;Teleglobe;GlobalCrossing #2;TeliaSonera #2;Teleglobe #2;TeliaSonera #3;TeliaSonera", "Preferred Server", "None"]] __author_name__ = ("spoob", "RaNaN", "mkaay") @@ -103,6 +103,8 @@ class RapidshareCom(Hoster): elif self.api_data["status"] in ("0","4","5"): self.offline() + elif self.api_data["status"] == "3": + self.tempOffline() else: self.fail("Unknown response code.") |