summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/account
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/account')
-rw-r--r--pyload/plugins/account/CramitIn.py4
-rw-r--r--pyload/plugins/account/CyberlockerCh.py35
-rw-r--r--pyload/plugins/account/DropboxCom.py4
-rw-r--r--pyload/plugins/account/EgoFilesCom.py44
-rw-r--r--pyload/plugins/account/File4safeCom.py4
-rw-r--r--pyload/plugins/account/FilerioCom.py4
-rw-r--r--pyload/plugins/account/HotfileCom.py74
-rw-r--r--pyload/plugins/account/MovReelCom.py4
-rw-r--r--pyload/plugins/account/OboomCom.py45
-rw-r--r--pyload/plugins/account/RarefileNet.py4
-rw-r--r--pyload/plugins/account/RyushareCom.py4
-rw-r--r--pyload/plugins/account/UptoboxCom.py4
12 files changed, 43 insertions, 187 deletions
diff --git a/pyload/plugins/account/CramitIn.py b/pyload/plugins/account/CramitIn.py
index 5bf7a3141..ee61310ef 100644
--- a/pyload/plugins/account/CramitIn.py
+++ b/pyload/plugins/account/CramitIn.py
@@ -6,10 +6,10 @@ from pyload.plugins.internal.XFSPAccount import XFSPAccount
class CramitIn(XFSPAccount):
__name__ = "CramitIn"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Cramit.in account plugin"""
__author_name__ = "zoidberg"
__author_mail__ = "zoidberg@mujmail.cz"
- MAIN_PAGE = "http://cramit.in/"
+ HOSTER_URL = "http://cramit.in/"
diff --git a/pyload/plugins/account/CyberlockerCh.py b/pyload/plugins/account/CyberlockerCh.py
deleted file mode 100644
index 94cc0d8c4..000000000
--- a/pyload/plugins/account/CyberlockerCh.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.plugins.internal.XFSPAccount import XFSPAccount
-from pyload.plugins.internal.SimpleHoster import parseHtmlForm
-
-
-class CyberlockerCh(XFSPAccount):
- __name__ = "CyberlockerCh"
- __type__ = "account"
- __version__ = "0.01"
-
- __description__ = """Cyberlocker.ch account plugin"""
- __author_name__ = "stickell"
- __author_mail__ = "l.stickell@yahoo.it"
-
- MAIN_PAGE = "http://cyberlocker.ch/"
-
-
- def login(self, user, data, req):
- html = req.load(self.MAIN_PAGE + 'login.html', decode=True)
-
- action, inputs = parseHtmlForm('name="FL"', html)
- if not inputs:
- inputs = {"op": "login",
- "redirect": self.MAIN_PAGE}
-
- inputs.update({"login": user,
- "password": data['password']})
-
- # Without this a 403 Forbidden is returned
- req.http.lastURL = self.MAIN_PAGE + 'login.html'
- html = req.load(self.MAIN_PAGE, post=inputs, decode=True)
-
- if 'Incorrect Login or Password' in html or '>Error<' in html:
- self.wrongPassword()
diff --git a/pyload/plugins/account/DropboxCom.py b/pyload/plugins/account/DropboxCom.py
index d3078c7f6..15e95d46d 100644
--- a/pyload/plugins/account/DropboxCom.py
+++ b/pyload/plugins/account/DropboxCom.py
@@ -8,7 +8,7 @@ from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DropboxCom(SimpleHoster):
__name__ = "DropboxCom"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__pattern__ = r'https?://(?:www\.)?dropbox\.com/.+'
@@ -22,7 +22,7 @@ class DropboxCom(SimpleHoster):
OFFLINE_PATTERN = r'<title>Dropbox - (404|Shared link error)<'
- SH_COOKIES = [(".dropbox.com", "lang", "en")]
+ COOKIES = [(".dropbox.com", "lang", "en")]
def setup(self):
diff --git a/pyload/plugins/account/EgoFilesCom.py b/pyload/plugins/account/EgoFilesCom.py
deleted file mode 100644
index 8947d24c7..000000000
--- a/pyload/plugins/account/EgoFilesCom.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-import time
-
-from pyload.plugins.base.Account import Account
-from pyload.utils import parseFileSize
-
-
-class EgoFilesCom(Account):
- __name__ = "EgoFilesCom"
- __type__ = "account"
- __version__ = "0.2"
-
- __description__ = """Egofiles.com account plugin"""
- __author_name__ = "stickell"
- __author_mail__ = "l.stickell@yahoo.it"
-
- PREMIUM_ACCOUNT_PATTERN = '<br/>\s*Premium: (?P<P>[^/]*) / Traffic left: (?P<T>[\d.]*) (?P<U>\w*)\s*\\n\s*<br/>'
-
-
- def loadAccountInfo(self, user, req):
- html = req.load("http://egofiles.com")
- if 'You are logged as a Free User' in html:
- return {"premium": False, "validuntil": None, "trafficleft": None}
-
- m = re.search(self.PREMIUM_ACCOUNT_PATTERN, html)
- if m:
- validuntil = int(time.mktime(time.strptime(m.group('P'), "%Y-%m-%d %H:%M:%S")))
- trafficleft = parseFileSize(m.group('T'), m.group('U')) / 1024
- return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft}
- else:
- self.logError("Unable to retrieve account information - Plugin may be out of date")
-
- def login(self, user, data, req):
- # Set English language
- req.load("https://egofiles.com/ajax/lang.php?lang=en", just_header=True)
-
- html = req.load("http://egofiles.com/ajax/register.php",
- post={"log": 1,
- "loginV": user,
- "passV": data['password']})
- if 'Login successful' not in html:
- self.wrongPassword()
diff --git a/pyload/plugins/account/File4safeCom.py b/pyload/plugins/account/File4safeCom.py
index 4da721193..4429b917b 100644
--- a/pyload/plugins/account/File4safeCom.py
+++ b/pyload/plugins/account/File4safeCom.py
@@ -6,13 +6,13 @@ from pyload.plugins.internal.XFSPAccount import XFSPAccount
class File4safeCom(XFSPAccount):
__name__ = "File4safeCom"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """File4safe.com account plugin"""
__author_name__ = "stickell"
__author_mail__ = "l.stickell@yahoo.it"
- MAIN_PAGE = "http://file4safe.com/"
+ HOSTER_URL = "http://file4safe.com/"
LOGIN_FAIL_PATTERN = r'input_login'
PREMIUM_PATTERN = r'Extend Premium'
diff --git a/pyload/plugins/account/FilerioCom.py b/pyload/plugins/account/FilerioCom.py
index 0a8bc10cd..c86fa7e1f 100644
--- a/pyload/plugins/account/FilerioCom.py
+++ b/pyload/plugins/account/FilerioCom.py
@@ -6,10 +6,10 @@ from pyload.plugins.internal.XFSPAccount import XFSPAccount
class FilerioCom(XFSPAccount):
__name__ = "FilerioCom"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """FileRio.in account plugin"""
__author_name__ = "zoidberg"
__author_mail__ = "zoidberg@mujmail.cz"
- MAIN_PAGE = "http://filerio.in/"
+ HOSTER_URL = "http://filerio.in/"
diff --git a/pyload/plugins/account/HotfileCom.py b/pyload/plugins/account/HotfileCom.py
deleted file mode 100644
index 3dde85b49..000000000
--- a/pyload/plugins/account/HotfileCom.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from time import strptime, mktime
-import hashlib
-
-from pyload.plugins.base.Account import Account
-
-
-class HotfileCom(Account):
- __name__ = "HotfileCom"
- __type__ = "account"
- __version__ = "0.2"
-
- __description__ = """Hotfile.com account plugin"""
- __author_name__ = ("mkaay", "JoKoT3")
- __author_mail__ = ("mkaay@mkaay.de", "jokot3@gmail.com")
-
-
- def loadAccountInfo(self, user, req):
- resp = self.apiCall("getuserinfo", user=user)
- if resp.startswith("."):
- self.core.debug("HotfileCom API Error: %s" % resp)
- raise Exception
- info = {}
- for p in resp.split("&"):
- key, value = p.split("=")
- info[key] = value
-
- if info['is_premium'] == '1':
- info['premium_until'] = info['premium_until'].replace("T", " ")
- zone = info['premium_until'][19:]
- info['premium_until'] = info['premium_until'][:19]
- zone = int(zone[:3])
-
- validuntil = int(mktime(strptime(info['premium_until'], "%Y-%m-%d %H:%M:%S"))) + (zone * 60 * 60)
- tmp = {"validuntil": validuntil, "trafficleft": -1, "premium": True}
-
- elif info['is_premium'] == '0':
- tmp = {"premium": False}
-
- return tmp
-
- def apiCall(self, method, post={}, user=None):
- if user:
- data = self.getAccountData(user)
- else:
- user, data = self.selectAccount()
-
- req = self.getAccountRequest(user)
-
- digest = req.load("http://api.hotfile.com/", post={"action": "getdigest"})
- h = hashlib.md5()
- h.update(data['password'])
- hp = h.hexdigest()
- h = hashlib.md5()
- h.update(hp)
- h.update(digest)
- pwhash = h.hexdigest()
-
- post.update({"action": method})
- post.update({"username": user, "passwordmd5dig": pwhash, "digest": digest})
- resp = req.load("http://api.hotfile.com/", post=post)
- req.close()
- return resp
-
- def login(self, user, data, req):
- cj = self.getAccountCookies(user)
- cj.setCookie("hotfile.com", "lang", "en")
- req.load("http://hotfile.com/", cookies=True)
- page = req.load("http://hotfile.com/login.php", post={"returnto": "/", "user": user, "pass": data['password']},
- cookies=True)
-
- if "Bad username/password" in page:
- self.wrongPassword()
diff --git a/pyload/plugins/account/MovReelCom.py b/pyload/plugins/account/MovReelCom.py
index 0f80b1aa8..71766427f 100644
--- a/pyload/plugins/account/MovReelCom.py
+++ b/pyload/plugins/account/MovReelCom.py
@@ -6,7 +6,7 @@ from pyload.plugins.internal.XFSPAccount import XFSPAccount
class MovReelCom(XFSPAccount):
__name__ = "MovReelCom"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Movreel.com account plugin"""
__author_name__ = "t4skforce"
@@ -15,7 +15,7 @@ class MovReelCom(XFSPAccount):
login_timeout = 60
info_threshold = 30
- MAIN_PAGE = "http://movreel.com/"
+ HOSTER_URL = "http://movreel.com/"
TRAFFIC_LEFT_PATTERN = r'Traffic.*?<b>([^<]+)</b>'
LOGIN_FAIL_PATTERN = r'<b[^>]*>Incorrect Login or Password</b><br>'
diff --git a/pyload/plugins/account/OboomCom.py b/pyload/plugins/account/OboomCom.py
index 14bdd1510..b304e210c 100644
--- a/pyload/plugins/account/OboomCom.py
+++ b/pyload/plugins/account/OboomCom.py
@@ -11,7 +11,7 @@ from pyload.plugins.base.Account import Account
class OboomCom(Account):
__name__ = "OboomCom"
__type__ = "account"
- __version__ = "0.1"
+ __version__ = "0.2"
__description__ = """Oboom.com account plugin"""
__author_name__ = "stanley"
@@ -22,32 +22,41 @@ class OboomCom(Account):
passwd = self.getAccountData(user)['password']
salt = passwd[::-1]
pbkdf2 = PBKDF2(passwd, salt, 1000).hexread(16)
- result = json_loads(req.load("https://www.oboom.com/1.0/login", get={"auth": user, "pass": pbkdf2}))
+ result = json_loads(req.load("https://www.oboom.com/1/login", get={"auth": user, "pass": pbkdf2}))
if not result[0] == 200:
self.logWarning("Failed to log in: %s" % result[1])
self.wrongPassword()
return result[1]
+
def loadAccountInfo(self, name, req):
accountData = self.loadAccountData(name, req)
+
userData = accountData['user']
- if "premium_unix" in userData:
- validUntilUtc = int(userData['premium_unix'])
- if validUntilUtc > int(time.time()):
- premium = True
- validUntil = validUntilUtc
- traffic = userData['traffic']
- trafficLeft = traffic['current']
- maxTraffic = traffic['max']
- session = accountData['session']
- return {"premium": premium,
- "validuntil": validUntil,
- "trafficleft": trafficLeft / 1024,
- "maxtraffic": maxTraffic / 1024,
- "session": session
- }
- return {"premium": False, "validuntil": -1}
+ if userData['premium'] == "null":
+ premium = False
+ else:
+ premium = True
+
+ if userData['premium_unix'] == "null":
+ validUntil = -1
+ else:
+ validUntil = int(userData['premium_unix'])
+
+ traffic = userData['traffic']
+
+ trafficLeft = traffic['current']
+ maxTraffic = traffic['max']
+
+ session = accountData['session']
+
+ return {'premium': premium,
+ 'validuntil': validUntil,
+ 'trafficleft': trafficLeft / 1024,
+ 'maxtraffic': maxTraffic / 1024,
+ 'session': session}
+
def login(self, user, data, req):
self.loadAccountData(user, req)
diff --git a/pyload/plugins/account/RarefileNet.py b/pyload/plugins/account/RarefileNet.py
index 68e2595e2..e715d0fe0 100644
--- a/pyload/plugins/account/RarefileNet.py
+++ b/pyload/plugins/account/RarefileNet.py
@@ -6,10 +6,10 @@ from pyload.plugins.internal.XFSPAccount import XFSPAccount
class RarefileNet(XFSPAccount):
__name__ = "RarefileNet"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """RareFile.net account plugin"""
__author_name__ = "zoidberg"
__author_mail__ = "zoidberg@mujmail.cz"
- MAIN_PAGE = "http://rarefile.net/"
+ HOSTER_URL = "http://rarefile.net/"
diff --git a/pyload/plugins/account/RyushareCom.py b/pyload/plugins/account/RyushareCom.py
index 74258e984..032132537 100644
--- a/pyload/plugins/account/RyushareCom.py
+++ b/pyload/plugins/account/RyushareCom.py
@@ -6,13 +6,13 @@ from pyload.plugins.internal.XFSPAccount import XFSPAccount
class RyushareCom(XFSPAccount):
__name__ = "RyushareCom"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__description__ = """Ryushare.com account plugin"""
__author_name__ = ("zoidberg", "trance4us")
__author_mail__ = ("zoidberg@mujmail.cz", "")
- MAIN_PAGE = "http://ryushare.com/"
+ HOSTER_URL = "http://ryushare.com/"
def login(self, user, data, req):
diff --git a/pyload/plugins/account/UptoboxCom.py b/pyload/plugins/account/UptoboxCom.py
index 7f9618da8..94c32e753 100644
--- a/pyload/plugins/account/UptoboxCom.py
+++ b/pyload/plugins/account/UptoboxCom.py
@@ -6,12 +6,12 @@ from pyload.plugins.internal.XFSPAccount import XFSPAccount
class UptoboxCom(XFSPAccount):
__name__ = "UptoboxCom"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """DDLStorage.com account plugin"""
__author_name__ = "zoidberg"
__author_mail__ = "zoidberg@mujmail.cz"
- MAIN_PAGE = "http://uptobox.com/"
+ HOSTER_URL = "http://uptobox.com/"
VALID_UNTIL_PATTERN = r'>Premium.[Aa]ccount expire: ([^<]+)</strong>'