summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-30 21:00:46 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-30 21:00:46 +0100
commita55de481b3b2de288dc059bb48c72dd348bb6a66 (patch)
tree7474de3455e6315ed2e2f1f6d732e00bc38e9281 /module
parentOronCom fix - thx petrucci77 (diff)
parentrehost fix (diff)
downloadpyload-a55de481b3b2de288dc059bb48c72dd348bb6a66.tar.xz
Merged in DHMH/pyload (pull request #13)
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hooks/RehostTo.py4
-rw-r--r--module/plugins/hooks/UpdateManager.py7
-rw-r--r--module/plugins/hoster/FilesonicCom.py10
-rw-r--r--module/plugins/hoster/MegauploadCom.py9
4 files changed, 16 insertions, 14 deletions
diff --git a/module/plugins/hooks/RehostTo.py b/module/plugins/hooks/RehostTo.py
index 34bcbf4c7..b16987f5c 100644
--- a/module/plugins/hooks/RehostTo.py
+++ b/module/plugins/hooks/RehostTo.py
@@ -5,7 +5,7 @@ from module.plugins.internal.MultiHoster import MultiHoster
class RehostTo(MultiHoster):
__name__ = "RehostTo"
- __version__ = "0.4"
+ __version__ = "0.41"
__type__ = "hook"
__config__ = [("activated", "bool", "Activated", "False")]
@@ -24,7 +24,7 @@ class RehostTo(MultiHoster):
def coreReady(self):
- self.account = self.core.accountManager.loadClass("accounts", "RehostTo")
+ self.account = self.core.accountManager.getAccountPlugin("RehostTo")
user = self.account.selectAccount()[0]
diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py
index 920a88060..0dfb42ff2 100644
--- a/module/plugins/hooks/UpdateManager.py
+++ b/module/plugins/hooks/UpdateManager.py
@@ -30,7 +30,7 @@ from module.plugins.Hook import threaded, Expose, Hook
class UpdateManager(Hook):
__name__ = "UpdateManager"
- __version__ = "0.1"
+ __version__ = "0.11"
__description__ = """checks for updates"""
__config__ = [("activated", "bool", "Activated", "True"),
("interval", "int", "Check interval in minutes", "360"),
@@ -124,6 +124,7 @@ class UpdateManager(Hook):
else:
name = filename.replace(".py", "")
+ #TODO: obsolete
if prefix.endswith("s"):
type = prefix[:-1]
else:
@@ -160,7 +161,7 @@ class UpdateManager(Hook):
f.close()
self.updated = True
- reloads.append((type, name))
+ reloads.append((prefix, name))
self.reloaded = self.core.pluginManager.reloadPlugins(reloads)
@@ -191,4 +192,4 @@ class UpdateManager(Hook):
reloads.append(id)
self.mtimes[id] = mtime
- self.core.pluginManager.reloadPlugins(reloads) \ No newline at end of file
+ self.core.pluginManager.reloadPlugins(reloads)
diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py
index 813333acb..736b5b96b 100644
--- a/module/plugins/hoster/FilesonicCom.py
+++ b/module/plugins/hoster/FilesonicCom.py
@@ -28,7 +28,7 @@ def getInfo(urls):
response = json_loads(getURL(check_url, decode=True))
for item in response["FSApi_Link"]["getInfo"]["response"]["links"]:
if item["status"] != "AVAILABLE":
- result.append((None, 0, 1, ids[str(item["id"])]))
+ result.append((ids[str(item["id"])], 0, 1, ids[str(item["id"])]))
else:
result.append((item["filename"], item["size"], 2, ids[str(item["id"])]))
yield result
@@ -45,16 +45,16 @@ def getId(url):
class FilesonicCom(Hoster):
__name__ = "FilesonicCom"
__type__ = "hoster"
- __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?"
- __version__ = "0.33"
+ __pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/.*?file/([a-zA-Z0-9]+(/.+)?|[a-z0-9]+/[0-9]+(/.+)?|[0-9]+(/.+)?)"
+ __version__ = "0.34"
__description__ = """FilesonicCom und Sharingmatrix Download Hoster"""
__author_name__ = ("jeix", "paulking")
__author_mail__ = ("jeix@hasnomail.de", "")
API_ADDRESS = "http://api.filesonic.com"
URL_DOMAIN_PATTERN = r'(?P<prefix>.*?)(?P<domain>.(filesonic|sharingmatrix)\..+?)(?P<suffix>/.*)'
- FILE_ID_PATTERN = r'/file/(?P<id>([a-z][0-9]+/)?[0-9]+)(/.*)?' #change may break wupload - be careful
- FILE_LINK_PATTERN = r'<p><a href="(http://.+?\.(filesonic|sharingmatrix)\..+?)"><span>Start download'
+ FILE_ID_PATTERN = r'/file/(?P<id>([a-z][0-9]+/)?[a-zA-Z0-9\-._+]+)(/.*)?' #change may break wupload - be careful
+ FILE_LINK_PATTERN = r'<a href="(http://.+?\.(filesonic|sharingmatrix)\..+?)" class="downloadLink"><span>Start Download'
WAIT_TIME_PATTERN = r'countDownDelay = (?P<wait>\d+)'
WAIT_TM_PATTERN = r"name='tm' value='(.*?)' />"
WAIT_TM_HASH_PATTERN = r"name='tm_hash' value='(.*?)' />"
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index 100553ebf..6b5d10729 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -65,7 +65,7 @@ class MegauploadCom(Hoster):
__name__ = "MegauploadCom"
__type__ = "hoster"
__pattern__ = r"http://[\w\.]*?(megaupload)\.com/.*?(\?|&)d=(?P<id>[0-9A-Za-z]+)"
- __version__ = "0.28"
+ __version__ = "0.3"
__description__ = """Megaupload.com Download Hoster"""
__author_name__ = ("spoob")
__author_mail__ = ("spoob@pyload.org")
@@ -74,6 +74,7 @@ class MegauploadCom(Hoster):
API_STATUS_MAPPING = {"0": statusMap['online'], "1": statusMap['offline'], "3": statusMap['temp. offline']}
FILE_URL_PATTERN = r'<a href="([^"]+)" class="download_regular_usual"'
+ PREMIUM_URL_PATTERN = r'href=\"(http://[^\"]*?)\" class=\"download_premium_but\">'
def init(self):
self.html = [None, None]
@@ -125,12 +126,12 @@ class MegauploadCom(Hoster):
if e.args and e.args[0] == 33:
# undirect download and resume , not a good idea
page = self.load(pyfile.url)
- self.download(re.search(r'href=\"(http://[^\"]*?)\" class=\"down_ad_butt1\">', page).group(1))
+ self.download(re.search(self.PREMIUM_URL_PATTERN, page).group(1))
return
else:
raise
- check = self.checkDownload({"dllink": re.compile(r'href=\"(http://[^\"]*?)\" class=\"down_ad_butt1\">')})
+ check = self.checkDownload({"dllink": re.compile(self.PREMIUM_URL_PATTERN)})
if check == "dllink":
self.log.warning(_("You should enable direct Download in your Megaupload Account settings"))
@@ -270,4 +271,4 @@ class MegauploadCom(Hoster):
if re.search("The password you have entered is not correct", self.html[1]):
self.fail(_("Wrong password for download link."))
- return True \ No newline at end of file
+ return True