summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hooks/AndroidPhoneNotify.py37
-rw-r--r--module/plugins/hoster/RapiduNet.py4
2 files changed, 39 insertions, 2 deletions
diff --git a/module/plugins/hooks/AndroidPhoneNotify.py b/module/plugins/hooks/AndroidPhoneNotify.py
new file mode 100644
index 000000000..d6bf64db4
--- /dev/null
+++ b/module/plugins/hooks/AndroidPhoneNotify.py
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+
+
+from module.plugins.Hook import Hook
+from module.network.RequestFactory import getURL
+
+class AndroidPhoneNotify(Hook):
+ __name__ = "AndroidPhoneNotify"
+ __type__ = "hook"
+ __version__ = "0.01"
+
+ __config__ = [("apikey", "str", "apikey", ""),
+ ("appname", "str", "ApplicationName", "pyLoad"),
+ ("notifycaptcha", "bool", "Send captcha notifications (maybe usefull if premium fails)", False)]
+
+ __description__ = """Send push notifications to your Android Phone using notifymyandroid.com"""
+ __license__ = "GPLv3"
+ __authors__ = [("Steven Kosyra", "steven.kosyra@gmail.com")]
+
+
+ def packageFinished(self, pypack):
+ self.genUrl("Package finished:",pypack.name)
+
+
+ def newCaptchaTask(self, task):
+ if self.getConfig("notifycaptcha"):
+ self.genUrl("Captcha","new Captcha request")
+
+
+
+ def genUrl(self,event, msg):
+ self.response(event, msg)
+
+
+
+ def response(self, event, msg):
+ html = getURL("http://www.notifymyandroid.com/publicapi/notify?apikey=" + self.getConfig("apikey") + "&application=" + self.getConfig("appname") + "&event=" + str(event) + "&description= " + str(msg) + "")
diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py
index 34e71b5f2..0c40d95b9 100644
--- a/module/plugins/hoster/RapiduNet.py
+++ b/module/plugins/hoster/RapiduNet.py
@@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RapiduNet(SimpleHoster):
__name__ = "RapiduNet"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P<ID>\d{10})'
@@ -66,7 +66,7 @@ class RapiduNet(SimpleHoster):
post={'_go' : "",
'captcha1': challenge,
'captcha2': response,
- 'fileId' : self.info['ID']},
+ 'fileId' : self.info['pattern']['ID']},
decode=True)
if jsvars['message'] == 'success':
self.download(jsvars['url'])