summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-09 13:05:38 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-09 13:05:38 +0200
commit63d747c7c9ff2d6753cee22faa18d14f7d148428 (patch)
tree1ea729a1feeb0f3f38e806404e69b04b21e49bf4 /module/plugins
parentmerge (diff)
downloadpyload-63d747c7c9ff2d6753cee22faa18d14f7d148428.tar.xz
netload premium
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/accounts/NetloadIn.py36
-rw-r--r--module/plugins/hoster/NetloadIn.py10
2 files changed, 37 insertions, 9 deletions
diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py
new file mode 100644
index 000000000..95e77a9cb
--- /dev/null
+++ b/module/plugins/accounts/NetloadIn.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: mkaay
+"""
+
+from module.plugins.Account import Account
+import re
+from time import strptime, mktime
+
+class NetloadIn(Account):
+ __name__ = "NetloadIn"
+ __version__ = "0.1"
+ __type__ = "account"
+ __description__ = """netload.in account plugin"""
+ __author_name__ = ("RaNaN")
+ __author_mail__ = ("RaNaN@pyload.org")
+
+ def login(self):
+ for user, data in self.accounts.items():
+ req = self.core.requestFactory.getRequest(self.__name__, user)
+ req.load("http://netload.in/index.php", None, { "txtuser" : user, "txtpass" : data['password'], "txtcheck" : "login", "txtlogin" : ""}, cookies=True)
+ \ No newline at end of file
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index 059d6a8f8..f9e3d31ad 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -75,13 +75,6 @@ class NetloadIn(Hoster):
self.pyfile.setStatus("downloading")
self.proceed(self.url)
- def getInfo(self):
- self.log.debug("Netload: Info prefetch")
- self.download_api_data()
- if self.api_data and self.api_data["filename"]:
- self.pyfile.name = self.api_data["filename"]
- self.pyfile.sync()
-
def prepare(self):
self.download_api_data()
@@ -215,7 +208,6 @@ class NetloadIn(Hoster):
def proceed(self, url):
self.log.debug("Netload: Downloading..")
- if self.account:
- self.req.load("http://netload.in/index.php", None, { "txtuser" : self.config['username'], "txtpass" : self.config['password'], "txtcheck" : "login", "txtlogin" : ""}, cookies=True)
+
self.download(url, cookies=True)