summaryrefslogtreecommitdiffstats
path: root/pyload/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins')
-rw-r--r--pyload/plugins/accounts/AlldebridCom.py27
-rw-r--r--pyload/plugins/accounts/BayfilesCom.py16
-rw-r--r--pyload/plugins/accounts/BitshareCom.py9
-rw-r--r--pyload/plugins/accounts/BoltsharingCom.py1
-rw-r--r--pyload/plugins/accounts/CramitIn.py5
-rw-r--r--pyload/plugins/accounts/CyberlockerCh.py5
-rw-r--r--pyload/plugins/accounts/DdlstorageCom.py5
-rw-r--r--pyload/plugins/accounts/DebridItaliaCom.py1
-rw-r--r--pyload/plugins/accounts/DepositfilesCom.py15
-rw-r--r--pyload/plugins/accounts/EasybytezCom.py36
-rw-r--r--pyload/plugins/accounts/EgoFilesCom.py4
-rw-r--r--pyload/plugins/accounts/EuroshareEu.py25
-rw-r--r--pyload/plugins/accounts/FilebeerInfo.py22
-rw-r--r--pyload/plugins/accounts/FilecloudIo.py22
-rw-r--r--pyload/plugins/accounts/FilefactoryCom.py18
-rw-r--r--pyload/plugins/accounts/FilejungleCom.py20
-rw-r--r--pyload/plugins/accounts/FilerNet.py1
-rw-r--r--pyload/plugins/accounts/FilerioCom.py5
-rw-r--r--pyload/plugins/accounts/FilesMailRu.py13
-rw-r--r--pyload/plugins/accounts/FileserveCom.py2
-rw-r--r--pyload/plugins/accounts/FourSharedCom.py25
-rw-r--r--pyload/plugins/accounts/FreakshareCom.py4
-rw-r--r--pyload/plugins/accounts/FshareVn.py19
-rw-r--r--pyload/plugins/accounts/Ftp.py5
-rw-r--r--pyload/plugins/accounts/HellshareCz.py18
-rw-r--r--pyload/plugins/accounts/HellspyCz.py23
-rw-r--r--pyload/plugins/accounts/HotfileCom.py41
-rw-r--r--pyload/plugins/accounts/Http.py5
-rw-r--r--pyload/plugins/accounts/MegasharesCom.py34
-rw-r--r--pyload/plugins/accounts/MultishareCz.py25
-rwxr-xr-xpyload/plugins/accounts/NetloadIn.py14
-rw-r--r--pyload/plugins/accounts/Premium4Me.py8
-rw-r--r--pyload/plugins/accounts/PremiumizeMe.py14
-rw-r--r--pyload/plugins/accounts/QuickshareCz.py23
-rw-r--r--pyload/plugins/accounts/RapidgatorNet.py37
-rw-r--r--pyload/plugins/accounts/RapidshareCom.py19
-rw-r--r--pyload/plugins/accounts/RarefileNet.py3
-rw-r--r--pyload/plugins/accounts/RealdebridCom.py15
-rw-r--r--pyload/plugins/accounts/RehostTo.py4
-rw-r--r--pyload/plugins/accounts/ReloadCc.py4
-rw-r--r--pyload/plugins/accounts/RyushareCom.py12
-rw-r--r--pyload/plugins/accounts/Share76Com.py1
-rw-r--r--pyload/plugins/accounts/ShareFilesCo.py1
-rw-r--r--pyload/plugins/accounts/ShareRapidCom.py21
-rw-r--r--pyload/plugins/accounts/ShareonlineBiz.py5
-rw-r--r--pyload/plugins/accounts/SpeedLoadOrg.py1
-rw-r--r--pyload/plugins/accounts/StahnuTo.py18
-rw-r--r--pyload/plugins/accounts/TurbobitNet.py16
-rw-r--r--pyload/plugins/accounts/UlozTo.py28
-rw-r--r--pyload/plugins/accounts/UploadedTo.py17
-rw-r--r--pyload/plugins/accounts/UploadheroCom.py20
-rw-r--r--pyload/plugins/accounts/UploadingCom.py15
-rw-r--r--pyload/plugins/accounts/UploadstationCom.py3
-rw-r--r--pyload/plugins/accounts/UptoboxCom.py5
-rw-r--r--pyload/plugins/accounts/WarserverCz.py44
-rw-r--r--pyload/plugins/accounts/WuploadCom.py3
-rw-r--r--pyload/plugins/accounts/X7To.py7
-rw-r--r--pyload/plugins/accounts/YibaishiwuCom.py14
-rw-r--r--pyload/plugins/accounts/ZeveraCom.py28
59 files changed, 455 insertions, 396 deletions
diff --git a/pyload/plugins/accounts/AlldebridCom.py b/pyload/plugins/accounts/AlldebridCom.py
index 24f81cfd0..ed2d70855 100644
--- a/pyload/plugins/accounts/AlldebridCom.py
+++ b/pyload/plugins/accounts/AlldebridCom.py
@@ -1,10 +1,10 @@
import xml.dom.minidom as dom
-from BeautifulSoup import BeautifulSoup
from time import time
import re
import urllib
from pyload.plugins.MultiHoster import MultiHoster
+from BeautifulSoup import BeautifulSoup
class AlldebridCom(MultiHoster):
__name__ = "AlldebridCom"
@@ -17,35 +17,36 @@ class AlldebridCom(MultiHoster):
def loadAccountInfo(self, user, req):
data = self.getAccountData(user)
page = req.load("http://www.alldebrid.com/account/")
- soup=BeautifulSoup(page)
+ soup = BeautifulSoup(page)
#Try to parse expiration date directly from the control panel page (better accuracy)
try:
- time_text=soup.find('div',attrs={'class':'remaining_time_text'}).strong.string
+ time_text = soup.find('div', attrs={'class': 'remaining_time_text'}).strong.string
self.log.debug("Account expires in: %s" % time_text)
p = re.compile('\d+')
- exp_data=p.findall(time_text)
- exp_time=time()+int(exp_data[0])*24*60*60+int(exp_data[1])*60*60+(int(exp_data[2])-1)*60
+ exp_data = p.findall(time_text)
+ exp_time = time() + int(exp_data[0]) * 24 * 60 * 60 + int(
+ exp_data[1]) * 60 * 60 + (int(exp_data[2]) - 1) * 60
#Get expiration date from API
except:
data = self.getAccountData(user)
- page = req.load("http://www.alldebrid.com/api.php?action=info_user&login=%s&pw=%s" % (user, data["password"]))
+ page = req.load("http://www.alldebrid.com/api.php?action=info_user&login=%s&pw=%s" % (user,
+ data["password"]))
self.log.debug(page)
xml = dom.parseString(page)
- exp_time=time()+int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue)*86400
+ exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 86400
account_info = {"validuntil": exp_time, "trafficleft": -1}
return account_info
- def login(self, user, data, req):
-
- urlparams = urllib.urlencode({'action':'login','login_login':user,'login_password':data["password"]})
- page = req.load("http://www.alldebrid.com/register/?%s" % (urlparams))
+ def login(self, user, data, req):
+ urlparams = urllib.urlencode({'action': 'login', 'login_login': user, 'login_password': data["password"]})
+ page = req.load("http://www.alldebrid.com/register/?%s" % urlparams)
if "This login doesn't exist" in page:
self.wrongPassword()
-
+
if "The password is not valid" in page:
self.wrongPassword()
-
+
if "Invalid captcha" in page:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/BayfilesCom.py b/pyload/plugins/accounts/BayfilesCom.py
index 0d036488b..bf5cc54af 100644
--- a/pyload/plugins/accounts/BayfilesCom.py
+++ b/pyload/plugins/accounts/BayfilesCom.py
@@ -17,10 +17,11 @@
@author: zoidberg
"""
+from time import time
+
from module.plugins.Account import Account
from module.common.json_layer import json_loads
-import re
-from time import time, mktime, strptime
+
class BayfilesCom(Account):
__name__ = "BayfilesCom"
@@ -33,14 +34,13 @@ class BayfilesCom(Account):
def loadAccountInfo(self, user, req):
for i in range(2):
response = json_loads(req.load("http://api.bayfiles.com/v1/account/info"))
- self.logDebug(response)
- if not response["error"]:
+ self.logDebug(response)
+ if not response["error"]:
break
self.logWarning(response["error"])
self.relogin()
-
- return {"premium": bool(response['premium']), \
- "trafficleft": -1, \
+
+ return {"premium": bool(response['premium']), "trafficleft": -1,
"validuntil": response['expires'] if response['expires'] >= int(time()) else -1}
def login(self, user, data, req):
@@ -48,4 +48,4 @@ class BayfilesCom(Account):
self.logDebug(response)
if response["error"]:
self.logError(response["error"])
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/BitshareCom.py b/pyload/plugins/accounts/BitshareCom.py
index a4f56e31c..39cff36eb 100644
--- a/pyload/plugins/accounts/BitshareCom.py
+++ b/pyload/plugins/accounts/BitshareCom.py
@@ -19,6 +19,7 @@
from module.plugins.Account import Account
+
class BitshareCom(Account):
__name__ = "BitshareCom"
__version__ = "0.11"
@@ -28,17 +29,17 @@ class BitshareCom(Account):
def loadAccountInfo(self, user, req):
page = req.load("http://bitshare.com/mysettings.html")
-
+
if "\"http://bitshare.com/myupgrade.html\">Free" in page:
- return {"validuntil": -1, "trafficleft":-1, "premium": False}
+ return {"validuntil": -1, "trafficleft": -1, "premium": False}
if not '<input type="checkbox" name="directdownload" checked="checked" />' in page:
self.core.log.warning(_("Activate direct Download in your Bitshare Account"))
return {"validuntil": -1, "trafficleft": -1, "premium": True}
-
def login(self, user, data, req):
- page = req.load("http://bitshare.com/login.html", post={ "user" : user, "password" : data["password"], "submit" :"Login"}, cookies=True)
+ page = req.load("http://bitshare.com/login.html",
+ post={"user": user, "password": data["password"], "submit": "Login"}, cookies=True)
if "login" in req.lastEffectiveURL:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/BoltsharingCom.py b/pyload/plugins/accounts/BoltsharingCom.py
index 678591d1d..76e010532 100644
--- a/pyload/plugins/accounts/BoltsharingCom.py
+++ b/pyload/plugins/accounts/BoltsharingCom.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class BoltsharingCom(XFSPAccount):
__name__ = "BoltsharingCom"
__version__ = "0.01"
diff --git a/pyload/plugins/accounts/CramitIn.py b/pyload/plugins/accounts/CramitIn.py
index 182c9d647..b0334b191 100644
--- a/pyload/plugins/accounts/CramitIn.py
+++ b/pyload/plugins/accounts/CramitIn.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class CramitIn(XFSPAccount):
__name__ = "CramitIn"
__version__ = "0.01"
@@ -8,5 +9,5 @@ class CramitIn(XFSPAccount):
__description__ = """cramit.in account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
- MAIN_PAGE = "http://cramit.in/" \ No newline at end of file
+
+ MAIN_PAGE = "http://cramit.in/"
diff --git a/pyload/plugins/accounts/CyberlockerCh.py b/pyload/plugins/accounts/CyberlockerCh.py
index 31e0c3e24..0eaa262eb 100644
--- a/pyload/plugins/accounts/CyberlockerCh.py
+++ b/pyload/plugins/accounts/CyberlockerCh.py
@@ -2,6 +2,7 @@
from module.plugins.internal.XFSPAccount import XFSPAccount
from module.plugins.internal.SimpleHoster import parseHtmlForm
+
class CyberlockerCh(XFSPAccount):
__name__ = "CyberlockerCh"
__version__ = "0.01"
@@ -13,7 +14,7 @@ class CyberlockerCh(XFSPAccount):
MAIN_PAGE = "http://cyberlocker.ch/"
def login(self, user, data, req):
- html = req.load(self.MAIN_PAGE + 'login.html', decode = True)
+ html = req.load(self.MAIN_PAGE + 'login.html', decode=True)
action, inputs = parseHtmlForm('name="FL"', html)
if not inputs:
@@ -25,7 +26,7 @@ class CyberlockerCh(XFSPAccount):
# 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)
+ 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/accounts/DdlstorageCom.py b/pyload/plugins/accounts/DdlstorageCom.py
index 01d165f23..6c610aa84 100644
--- a/pyload/plugins/accounts/DdlstorageCom.py
+++ b/pyload/plugins/accounts/DdlstorageCom.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class DdlstorageCom(XFSPAccount):
__name__ = "DdlstorageCom"
__version__ = "0.01"
@@ -8,5 +9,5 @@ class DdlstorageCom(XFSPAccount):
__description__ = """DDLStorage.com account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
- MAIN_PAGE = "http://ddlstorage.com/" \ No newline at end of file
+
+ MAIN_PAGE = "http://ddlstorage.com/"
diff --git a/pyload/plugins/accounts/DebridItaliaCom.py b/pyload/plugins/accounts/DebridItaliaCom.py
index 91dd3787f..82acd8f8e 100644
--- a/pyload/plugins/accounts/DebridItaliaCom.py
+++ b/pyload/plugins/accounts/DebridItaliaCom.py
@@ -16,7 +16,6 @@
############################################################################
import re
-import _strptime
import time
from module.plugins.Account import Account
diff --git a/pyload/plugins/accounts/DepositfilesCom.py b/pyload/plugins/accounts/DepositfilesCom.py
index b0730de8e..177d7267f 100644
--- a/pyload/plugins/accounts/DepositfilesCom.py
+++ b/pyload/plugins/accounts/DepositfilesCom.py
@@ -17,10 +17,12 @@
@author: mkaay
"""
-from module.plugins.Account import Account
import re
from time import strptime, mktime
+from module.plugins.Account import Account
+
+
class DepositfilesCom(Account):
__name__ = "DepositfilesCom"
__version__ = "0.1"
@@ -28,20 +30,19 @@ class DepositfilesCom(Account):
__description__ = """depositfiles.com account plugin"""
__author_name__ = ("mkaay")
__author_mail__ = ("mkaay@mkaay.de")
-
- def loadAccountInfo(self, user, req):
+ def loadAccountInfo(self, user, req):
src = req.load("http://depositfiles.com/de/gold/")
validuntil = re.search("noch den Gold-Zugriff: <b>(.*?)</b></div>", src).group(1)
validuntil = int(mktime(strptime(validuntil, "%Y-%m-%d %H:%M:%S")))
- tmp = {"validuntil":validuntil, "trafficleft":-1}
+ tmp = {"validuntil": validuntil, "trafficleft": -1}
return tmp
-
- def login(self, user, data, req):
+ def login(self, user, data, req):
req.load("http://depositfiles.com/de/gold/payment.php")
- src = req.load("http://depositfiles.com/de/login.php", get={"return": "/de/gold/payment.php"}, post={"login": user, "password": data["password"]})
+ src = req.load("http://depositfiles.com/de/login.php", get={"return": "/de/gold/payment.php"},
+ post={"login": user, "password": data["password"]})
if r'<div class="error_message">Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.</div>' in src:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/EasybytezCom.py b/pyload/plugins/accounts/EasybytezCom.py
index ba7829b83..cd995fbe5 100644
--- a/pyload/plugins/accounts/EasybytezCom.py
+++ b/pyload/plugins/accounts/EasybytezCom.py
@@ -17,11 +17,13 @@
@author: zoidberg
"""
+import re
+from time import mktime, strptime
+
from module.plugins.Account import Account
from module.plugins.internal.SimpleHoster import parseHtmlForm
-import re
from module.utils import parseFileSize
-from time import mktime, strptime
+
class EasybytezCom(Account):
__name__ = "EasybytezCom"
@@ -30,16 +32,16 @@ class EasybytezCom(Account):
__description__ = """EasyBytez.com account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
VALID_UNTIL_PATTERN = r'<TR><TD>Premium account expire:</TD><TD><b>([^<]+)</b>'
TRAFFIC_LEFT_PATTERN = r'<TR><TD>Traffic available today:</TD><TD><b>(?P<S>[^<]+)</b>'
- def loadAccountInfo(self, user, req):
- html = req.load("http://www.easybytez.com/?op=my_account", decode = True)
-
+ def loadAccountInfo(self, user, req):
+ html = req.load("http://www.easybytez.com/?op=my_account", decode=True)
+
validuntil = trafficleft = None
premium = False
-
+
found = re.search(self.VALID_UNTIL_PATTERN, html)
if found:
premium = True
@@ -56,18 +58,18 @@ class EasybytezCom(Account):
if "Unlimited" in trafficleft:
premium = True
else:
- trafficleft = parseFileSize(trafficleft) / 1024
-
- return ({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium})
-
+ trafficleft = parseFileSize(trafficleft) / 1024
+
+ return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}
+
def login(self, user, data, req):
- html = req.load('http://www.easybytez.com/login.html', decode = True)
+ html = req.load('http://www.easybytez.com/login.html', decode=True)
action, inputs = parseHtmlForm('name="FL"', html)
inputs.update({"login": user,
"password": data['password'],
"redirect": "http://www.easybytez.com/"})
-
- html = req.load(action, post = inputs, decode = True)
-
- if 'Incorrect Login or Password' in html or '>Error<' in html:
- self.wrongPassword() \ No newline at end of file
+
+ html = req.load(action, post=inputs, decode=True)
+
+ if 'Incorrect Login or Password' in html or '>Error<' in html:
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/EgoFilesCom.py b/pyload/plugins/accounts/EgoFilesCom.py
index da1ed03ad..9c2b918c3 100644
--- a/pyload/plugins/accounts/EgoFilesCom.py
+++ b/pyload/plugins/accounts/EgoFilesCom.py
@@ -1,10 +1,12 @@
# -*- coding: utf-8 -*-
-from module.plugins.Account import Account
import re
import time
+
+from module.plugins.Account import Account
from module.utils import parseFileSize
+
class EgoFilesCom(Account):
__name__ = "EgoFilesCom"
__version__ = "0.2"
diff --git a/pyload/plugins/accounts/EuroshareEu.py b/pyload/plugins/accounts/EuroshareEu.py
index 42967d975..830c1db3f 100644
--- a/pyload/plugins/accounts/EuroshareEu.py
+++ b/pyload/plugins/accounts/EuroshareEu.py
@@ -17,11 +17,12 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
from time import mktime, strptime
-from string import replace
import re
+from module.plugins.Account import Account
+
+
class EuroshareEu(Account):
__name__ = "EuroshareEu"
__version__ = "0.01"
@@ -33,23 +34,23 @@ class EuroshareEu(Account):
def loadAccountInfo(self, user, req):
self.relogin(user)
html = req.load("http://euroshare.eu/customer-zone/settings/")
-
+
found = re.search('id="input_expire_date" value="(\d+\.\d+\.\d+ \d+:\d+)"', html)
if found is None:
premium, validuntil = False, -1
else:
premium = True
validuntil = mktime(strptime(found.group(1), "%d.%m.%Y %H:%M"))
-
+
return {"validuntil": validuntil, "trafficleft": -1, "premium": premium}
-
+
def login(self, user, data, req):
-
+
html = req.load('http://euroshare.eu/customer-zone/login/', post={
- "trvale": "1",
- "login": user,
- "password": data["password"]
- }, decode=True)
-
+ "trvale": "1",
+ "login": user,
+ "password": data["password"]
+ }, decode=True)
+
if u">Nesprávne prihlasovacie meno alebo heslo" in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/FilebeerInfo.py b/pyload/plugins/accounts/FilebeerInfo.py
index 40ab70519..3c3a9edfd 100644
--- a/pyload/plugins/accounts/FilebeerInfo.py
+++ b/pyload/plugins/accounts/FilebeerInfo.py
@@ -20,7 +20,7 @@
import re
from time import mktime, strptime
from module.plugins.Account import Account
-from module.utils import parseFileSize
+
class FilebeerInfo(Account):
__name__ = "FilebeerInfo"
@@ -29,29 +29,29 @@ class FilebeerInfo(Account):
__description__ = """filebeer.info account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
VALID_UNTIL_PATTERN = r'Reverts To Free Account:\s</td>\s*<td>\s*(.*?)\s*</td>'
-
+
def loadAccountInfo(self, user, req):
- html = req.load("http://filebeer.info/upgrade.php", decode = True)
+ html = req.load("http://filebeer.info/upgrade.php", decode=True)
premium = not 'Free User </td>' in html
-
+
validuntil = None
if premium:
try:
- validuntil = mktime(strptime(re.search(self.VALID_UNTIL_PATTERN, html).group(1), "%d/%m/%Y %H:%M:%S"))
+ validuntil = mktime(strptime(re.search(self.VALID_UNTIL_PATTERN, html).group(1), "%d/%m/%Y %H:%M:%S"))
except Exception, e:
self.logError("Unable to parse account info", e)
return {"validuntil": validuntil, "trafficleft": -1, "premium": premium}
-
+
def login(self, user, data, req):
- html = req.load('http://filebeer.info/login.php', post = {
+ html = req.load('http://filebeer.info/login.php', post={
"submit": 'Login',
"loginPassword": data['password'],
"loginUsername": user,
"submitme": '1'
- }, decode = True)
-
+ }, decode=True)
+
if "<ul class='pageErrors'>" in html or ">Your username and password are invalid<" in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/FilecloudIo.py b/pyload/plugins/accounts/FilecloudIo.py
index cf9f92209..5de722ea7 100644
--- a/pyload/plugins/accounts/FilecloudIo.py
+++ b/pyload/plugins/accounts/FilecloudIo.py
@@ -19,6 +19,7 @@
from module.plugins.Account import Account
+
class FilecloudIo(Account):
__name__ = "FilecloudIo"
__version__ = "0.01"
@@ -26,24 +27,23 @@ class FilecloudIo(Account):
__description__ = """FilecloudIo account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
- def loadAccountInfo(self, user, req):
- return ({"validuntil": -1, "trafficleft": -1, "premium": False})
-
+
+ def loadAccountInfo(self, user, req):
+ return {"validuntil": -1, "trafficleft": -1, "premium": False}
+
def login(self, user, data, req):
req.cj.setCookie("secure.filecloud.io", "lang", "en")
html = req.load('https://secure.filecloud.io/user-login.html')
-
+
if not hasattr(self, "form_data"):
self.form_data = {}
-
+
self.form_data["username"] = user
self.form_data["password"] = data['password']
-
+
html = req.load('https://secure.filecloud.io/user-login_p.html',
- post = self.form_data,
- multipart = True)
-
+ post=self.form_data,
+ multipart=True)
+
self.logged_in = True if "you have successfully logged in - filecloud.io" in html else False
self.form_data = {}
- \ No newline at end of file
diff --git a/pyload/plugins/accounts/FilefactoryCom.py b/pyload/plugins/accounts/FilefactoryCom.py
index 8e163e2f6..679409058 100644
--- a/pyload/plugins/accounts/FilefactoryCom.py
+++ b/pyload/plugins/accounts/FilefactoryCom.py
@@ -17,10 +17,12 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
import re
from time import mktime, strptime
+from module.plugins.Account import Account
+
+
class FilefactoryCom(Account):
__name__ = "FilefactoryCom"
__version__ = "0.13"
@@ -28,27 +30,27 @@ class FilefactoryCom(Account):
__description__ = """filefactory.com account plugin"""
__author_name__ = ("zoidberg", "stickell")
__author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
-
+
ACCOUNT_INFO_PATTERN = r'<time datetime="([\d-]+)">'
- def loadAccountInfo(self, user, req):
+ def loadAccountInfo(self, user, req):
html = req.load("http://www.filefactory.com/member/")
-
+
found = re.search(self.ACCOUNT_INFO_PATTERN, html)
if found:
premium = True
- validuntil = mktime(strptime(found.group(1),"%Y-%m-%d"))
+ validuntil = mktime(strptime(found.group(1), "%Y-%m-%d"))
else:
premium = False
- validuntil = -1
+ validuntil = -1
return {"premium": premium, "trafficleft": -1, "validuntil": validuntil}
def login(self, user, data, req):
html = req.load("http://www.filefactory.com/member/login.php", post={
- "email": user,
+ "email": user,
"password": data["password"],
"redirect": "/"})
-
+
if '/member/login.php?err=1' in req.http.header:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/FilejungleCom.py b/pyload/plugins/accounts/FilejungleCom.py
index 8ac25c201..2f2a6012d 100644
--- a/pyload/plugins/accounts/FilejungleCom.py
+++ b/pyload/plugins/accounts/FilejungleCom.py
@@ -17,10 +17,12 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
import re
from time import mktime, strptime
+from module.plugins.Account import Account
+
+
class FilejungleCom(Account):
__name__ = "FilejungleCom"
__version__ = "0.11"
@@ -28,9 +30,9 @@ class FilejungleCom(Account):
__description__ = """filejungle.com account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
login_timeout = 60
-
+
URL = "http://filejungle.com/"
TRAFFIC_LEFT_PATTERN = r'"/extend_premium\.php">Until (\d+ [A-Za-z]+ \d+)<br'
LOGIN_FAILED_PATTERN = r'<span htmlfor="loginUser(Name|Password)" generated="true" class="fail_info">'
@@ -42,19 +44,19 @@ class FilejungleCom(Account):
premium = True
validuntil = mktime(strptime(found.group(1), "%d %b %Y"))
else:
- premium = False
+ premium = False
validuntil = -1
return {"premium": premium, "trafficleft": -1, "validuntil": validuntil}
def login(self, user, data, req):
html = req.load(self.URL + "login.php", post={
- "loginUserName": user,
+ "loginUserName": user,
"loginUserPassword": data["password"],
"loginFormSubmit": "Login",
- "recaptcha_challenge_field": "",
- "recaptcha_response_field": "",
+ "recaptcha_challenge_field": "",
+ "recaptcha_response_field": "",
"recaptcha_shortencode_field": ""})
-
+
if re.search(self.LOGIN_FAILED_PATTERN, html):
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/FilerNet.py b/pyload/plugins/accounts/FilerNet.py
index 7afd00f25..45ce5ab37 100644
--- a/pyload/plugins/accounts/FilerNet.py
+++ b/pyload/plugins/accounts/FilerNet.py
@@ -16,7 +16,6 @@
############################################################################
import re
-import _strptime
import time
from module.plugins.Account import Account
diff --git a/pyload/plugins/accounts/FilerioCom.py b/pyload/plugins/accounts/FilerioCom.py
index feacacaf5..8b0b5f54f 100644
--- a/pyload/plugins/accounts/FilerioCom.py
+++ b/pyload/plugins/accounts/FilerioCom.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class FilerioCom(XFSPAccount):
__name__ = "FilerioCom"
__version__ = "0.01"
@@ -8,5 +9,5 @@ class FilerioCom(XFSPAccount):
__description__ = """FileRio.in account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
- MAIN_PAGE = "http://filerio.in/" \ No newline at end of file
+
+ MAIN_PAGE = "http://filerio.in/"
diff --git a/pyload/plugins/accounts/FilesMailRu.py b/pyload/plugins/accounts/FilesMailRu.py
index 98fe13248..ea976bd44 100644
--- a/pyload/plugins/accounts/FilesMailRu.py
+++ b/pyload/plugins/accounts/FilesMailRu.py
@@ -18,8 +18,7 @@
"""
from module.plugins.Account import Account
-import re
-from time import time
+
class FilesMailRu(Account):
__name__ = "FilesMailRu"
@@ -31,11 +30,13 @@ class FilesMailRu(Account):
def loadAccountInfo(self, user, req):
return {"validuntil": None, "trafficleft": None}
-
- def login(self, user, data,req):
+
+ def login(self, user, data, req):
user, domain = user.split("@")
- page = req.load("http://swa.mail.ru/cgi-bin/auth", None, { "Domain" : domain, "Login": user, "Password" : data['password'], "Page" : "http://files.mail.ru/"}, cookies=True)
+ page = req.load("http://swa.mail.ru/cgi-bin/auth", None,
+ {"Domain": domain, "Login": user, "Password": data['password'],
+ "Page": "http://files.mail.ru/"}, cookies=True)
- if "Неверное имя пользователя или пароль" in page: # @TODO seems not to work
+ if "Неверное имя пользователя или пароль" in page: # @TODO seems not to work
self.wrongPassword()
diff --git a/pyload/plugins/accounts/FileserveCom.py b/pyload/plugins/accounts/FileserveCom.py
index 5e5068f22..d4056891a 100644
--- a/pyload/plugins/accounts/FileserveCom.py
+++ b/pyload/plugins/accounts/FileserveCom.py
@@ -22,6 +22,7 @@ from time import mktime, strptime
from module.plugins.Account import Account
from module.common.json_layer import json_loads
+
class FileserveCom(Account):
__name__ = "FileserveCom"
__version__ = "0.2"
@@ -43,7 +44,6 @@ class FileserveCom(Account):
else:
return {"premium": False, "trafficleft": None, "validuntil": None}
-
def login(self, user, data, req):
page = req.load("http://app.fileserve.com/api/login/", post={"username": user, "password": data["password"],
"submit": "Submit+Query"})
diff --git a/pyload/plugins/accounts/FourSharedCom.py b/pyload/plugins/accounts/FourSharedCom.py
index bd3820277..69a465671 100644
--- a/pyload/plugins/accounts/FourSharedCom.py
+++ b/pyload/plugins/accounts/FourSharedCom.py
@@ -20,6 +20,7 @@
from module.plugins.Account import Account
from module.common.json_layer import json_loads
+
class FourSharedCom(Account):
__name__ = "FourSharedCom"
__version__ = "0.01"
@@ -27,22 +28,22 @@ class FourSharedCom(Account):
__description__ = """FourSharedCom account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
- def loadAccountInfo(self, user, req):
+
+ def loadAccountInfo(self, user, req):
#fixme
- return ({"validuntil": -1, "trafficleft": -1, "premium": False})
-
+ return {"validuntil": -1, "trafficleft": -1, "premium": False}
+
def login(self, user, data, req):
req.cj.setCookie("www.4shared.com", "4langcookie", "en")
response = req.load('http://www.4shared.com/login',
- post = {"login": user,
- "password": data['password'],
- "remember": "false",
- "doNotRedirect": "true"})
- self.logDebug(response)
+ post={"login": user,
+ "password": data['password'],
+ "remember": "false",
+ "doNotRedirect": "true"})
+ self.logDebug(response)
response = json_loads(response)
-
+
if not "ok" in response or response['ok'] != True:
if "rejectReason" in response and response['rejectReason'] != True:
- self.logError(response['rejectReason'])
- self.wrongPassword() \ No newline at end of file
+ self.logError(response['rejectReason'])
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/FreakshareCom.py b/pyload/plugins/accounts/FreakshareCom.py
index 732f9e203..cdf45114a 100644
--- a/pyload/plugins/accounts/FreakshareCom.py
+++ b/pyload/plugins/accounts/FreakshareCom.py
@@ -21,6 +21,7 @@ from time import strptime, mktime
from module.plugins.Account import Account
+
class FreakshareCom(Account):
__name__ = "FreakshareCom"
__version__ = "0.1"
@@ -45,7 +46,8 @@ class FreakshareCom(Account):
return {"validuntil": validuntil, "trafficleft": traffic}
def login(self, user, data, req):
- page = req.load("http://freakshare.com/login.html", None, { "submit" : "Login", "user" : user, "pass" : data['password']}, cookies=True)
+ page = req.load("http://freakshare.com/login.html", None,
+ {"submit": "Login", "user": user, "pass": data['password']}, cookies=True)
if "Falsche Logindaten!" in page or "Wrong Username or Password!" in page:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/FshareVn.py b/pyload/plugins/accounts/FshareVn.py
index 9b22cbafb..75191e74a 100644
--- a/pyload/plugins/accounts/FshareVn.py
+++ b/pyload/plugins/accounts/FshareVn.py
@@ -17,11 +17,13 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
from time import mktime, strptime
from pycurl import REFERER
import re
+from module.plugins.Account import Account
+
+
class FshareVn(Account):
__name__ = "FshareVn"
__version__ = "0.04"
@@ -35,13 +37,14 @@ class FshareVn(Account):
DIRECT_DOWNLOAD_PATTERN = ur'<input type="checkbox"\s*([^=>]*)[^>]*/>Kích hoạt download trực tiếp</dt>'
def loadAccountInfo(self, user, req):
- html = req.load("http://www.fshare.vn/account_info.php", decode = True)
+ html = req.load("http://www.fshare.vn/account_info.php", decode=True)
found = re.search(self.VALID_UNTIL_PATTERN, html)
if found:
premium = True
validuntil = mktime(strptime(found.group(1), '%I:%M:%S %p %d-%m-%Y'))
found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
- trafficleft = float(found.group(1)) * 1024 ** {'k': 0, 'K': 0, 'M': 1, 'G': 2}[found.group(2)] if found else 0
+ trafficleft = float(found.group(1)) * 1024 ** {
+ 'k': 0, 'K': 0, 'M': 1, 'G': 2}[found.group(2)] if found else 0
else:
premium = False
validuntil = None
@@ -52,11 +55,11 @@ class FshareVn(Account):
def login(self, user, data, req):
req.http.c.setopt(REFERER, "https://www.fshare.vn/login.php")
- html = req.load('https://www.fshare.vn/login.php', post = {
- "login_password" : data['password'],
- "login_useremail" : user,
- "url_refe" : "https://www.fshare.vn/login.php"
- }, referer = True, decode = True)
+ html = req.load('https://www.fshare.vn/login.php', post={
+ "login_password": data['password'],
+ "login_useremail": user,
+ "url_refe": "https://www.fshare.vn/login.php"
+ }, referer=True, decode=True)
if not '<img alt="VIP"' in html:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/Ftp.py b/pyload/plugins/accounts/Ftp.py
index 9c1081662..681d14cea 100644
--- a/pyload/plugins/accounts/Ftp.py
+++ b/pyload/plugins/accounts/Ftp.py
@@ -2,6 +2,7 @@
from module.plugins.Account import Account
+
class Ftp(Account):
__name__ = "Ftp"
__version__ = "0.01"
@@ -9,5 +10,5 @@ class Ftp(Account):
__description__ = """Ftp dummy account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
- login_timeout = info_threshold = 1000000 \ No newline at end of file
+
+ login_timeout = info_threshold = 1000000
diff --git a/pyload/plugins/accounts/HellshareCz.py b/pyload/plugins/accounts/HellshareCz.py
index c7a918dec..4718ade99 100644
--- a/pyload/plugins/accounts/HellshareCz.py
+++ b/pyload/plugins/accounts/HellshareCz.py
@@ -17,10 +17,12 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
import re
import time
+from module.plugins.Account import Account
+
+
class HellshareCz(Account):
__name__ = "HellshareCz"
__version__ = "0.14"
@@ -49,7 +51,7 @@ class HellshareCz(Account):
vt = [int(x) for x in credit.split('.')[:2]]
lt = time.localtime()
year = lt.tm_year + int(vt[1] < lt.tm_mon or (vt[1] == lt.tm_mon and vt[0] < lt.tm_mday))
- validuntil = time.mktime(time.strptime("%s%d 23:59:59" % (credit,year), "%d.%m.%Y %H:%M:%S"))
+ validuntil = time.mktime(time.strptime("%s%d 23:59:59" % (credit, year), "%d.%m.%Y %H:%M:%S"))
trafficleft = -1
else:
#Traffic-based account
@@ -77,11 +79,11 @@ class HellshareCz(Account):
return
html = req.load('http://www.hellshare.com/login?do=loginForm-submit', post={
- "login": "Log in",
- "password": data["password"],
- "username": user,
- "perm_login": "on"
- })
+ "login": "Log in",
+ "password": data["password"],
+ "username": user,
+ "perm_login": "on"
+ })
if "<p>You input a wrong user name or wrong password</p>" in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/HellspyCz.py b/pyload/plugins/accounts/HellspyCz.py
index 5f14a093e..1bb574731 100644
--- a/pyload/plugins/accounts/HellspyCz.py
+++ b/pyload/plugins/accounts/HellspyCz.py
@@ -17,9 +17,10 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
import re
-import string
+
+from module.plugins.Account import Account
+
class HellspyCz(Account):
__name__ = "HellspyCz"
@@ -48,23 +49,25 @@ class HellspyCz(Account):
return {"validuntil": -1, "trafficleft": credits}
- def login(self, user, data,req):
- header = req.load('http://www.hellspy.com/', just_header = True)
- self.phpsessid = re.search(r'PHPSESSID=(\w+)', header).group(1)
+ def login(self, user, data, req):
+ header = req.load('http://www.hellspy.com/', just_header=True)
+ self.phpsessid = re.search(r'PHPSESSID=(\w+)', header).group(1)
self.logDebug("PHPSESSID:" + self.phpsessid)
-
+
html = req.load("http://www.hellspy.com/--%s-" % self.phpsessid)
- html = req.load("http://www.hell-share.com/user/login/?do=apiLoginForm-submit&api_hash=hellspy_iq&user_hash=%s" % self.phpsessid, post={
+ html = req.load(
+ "http://www.hell-share.com/user/login/?do=apiLoginForm-submit&api_hash=hellspy_iq&user_hash=%s" % self.phpsessid,
+ post={
"login": "1",
"password": data["password"],
"username": user,
- "redir_url": 'http://www.hellspy.com/?do=loginBox-login',
+ "redir_url": 'http://www.hellspy.com/?do=loginBox-login',
"permanent_login": "1"
- })
+ })
cj = self.getAccountCookies(user)
cj.setCookie(".hellspy.com", "PHPSESSID", self.phpsessid)
if not re.search(self.CREDIT_LEFT_PATTERN, html):
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/HotfileCom.py b/pyload/plugins/accounts/HotfileCom.py
index 23e42dacf..4c144a883 100644
--- a/pyload/plugins/accounts/HotfileCom.py
+++ b/pyload/plugins/accounts/HotfileCom.py
@@ -17,18 +17,20 @@
@author: mkaay, JoKoT3
"""
-from module.plugins.Account import Account
from time import strptime, mktime
import hashlib
+from module.plugins.Account import Account
+
+
class HotfileCom(Account):
__name__ = "HotfileCom"
__version__ = "0.2"
__type__ = "account"
__description__ = """hotfile.com account plugin"""
- __author_name__ = ("mkaay","JoKoT3")
- __author_mail__ = ("mkaay@mkaay.de","jokot3@gmail.com")
-
+ __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("."):
@@ -40,28 +42,28 @@ class HotfileCom(Account):
info[key] = value
if info['is_premium'] == '1':
- info["premium_until"] = info["premium_until"].replace("T"," ")
+ 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*3600)
- tmp = {"validuntil":validuntil, "trafficleft":-1, "premium":True}
+
+ validuntil = int(mktime(strptime(info["premium_until"], "%Y-%m-%d %H:%M:%S"))) + (zone * 3600)
+ tmp = {"validuntil": validuntil, "trafficleft": -1, "premium": True}
elif info['is_premium'] == '0':
- tmp = {"premium":False}
-
+ 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"})
+
+ digest = req.load("http://api.hotfile.com/", post={"action": "getdigest"})
h = hashlib.md5()
h.update(data["password"])
hp = h.hexdigest()
@@ -69,18 +71,19 @@ class HotfileCom(Account):
h.update(hp)
h.update(digest)
pwhash = h.hexdigest()
-
+
post.update({"action": method})
- post.update({"username":user, "passwordmd5dig":pwhash, "digest":digest})
+ 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)
+ 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() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/Http.py b/pyload/plugins/accounts/Http.py
index 805d19900..5701d1f03 100644
--- a/pyload/plugins/accounts/Http.py
+++ b/pyload/plugins/accounts/Http.py
@@ -2,6 +2,7 @@
from module.plugins.Account import Account
+
class Http(Account):
__name__ = "Http"
__version__ = "0.01"
@@ -9,5 +10,5 @@ class Http(Account):
__description__ = """Http dummy account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
- login_timeout = info_threshold = 1000000 \ No newline at end of file
+
+ login_timeout = info_threshold = 1000000
diff --git a/pyload/plugins/accounts/MegasharesCom.py b/pyload/plugins/accounts/MegasharesCom.py
index 91601fc95..e7d5f9ca9 100644
--- a/pyload/plugins/accounts/MegasharesCom.py
+++ b/pyload/plugins/accounts/MegasharesCom.py
@@ -1,9 +1,11 @@
# -*- coding: utf-8 -*-
-from module.plugins.Account import Account
import re
from time import mktime, strptime
+from module.plugins.Account import Account
+
+
class MegasharesCom(Account):
__name__ = "MegasharesCom"
__version__ = "0.02"
@@ -11,32 +13,32 @@ class MegasharesCom(Account):
__description__ = """megashares.com account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
VALID_UNTIL_PATTERN = r'<p class="premium_info_box">Period Ends: (\w{3} \d{1,2}, \d{4})</p>'
-
+
def loadAccountInfo(self, user, req):
#self.relogin(user)
- html = req.load("http://d01.megashares.com/myms.php", decode = True)
-
+ html = req.load("http://d01.megashares.com/myms.php", decode=True)
+
premium = False if '>Premium Upgrade<' in html else True
-
+
validuntil = trafficleft = -1
- try:
+ try:
timestr = re.search(self.VALID_UNTIL_PATTERN, html).group(1)
self.logDebug(timestr)
validuntil = mktime(strptime(timestr, "%b %d, %Y"))
except Exception, e:
- self.logError(e)
-
+ self.logError(e)
+
return {"validuntil": validuntil, "trafficleft": -1, "premium": premium}
-
+
def login(self, user, data, req):
- html = req.load('http://d01.megashares.com/myms_login.php', post = {
- "httpref": "",
- "myms_login": "Login",
+ html = req.load('http://d01.megashares.com/myms_login.php', post={
+ "httpref": "",
+ "myms_login": "Login",
"mymslogin_name": user,
"mymspassword": data['password']
- }, decode = True)
-
+ }, decode=True)
+
if not '<span class="b ml">%s</span>' % user in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/MultishareCz.py b/pyload/plugins/accounts/MultishareCz.py
index 39439cbbe..273936615 100644
--- a/pyload/plugins/accounts/MultishareCz.py
+++ b/pyload/plugins/accounts/MultishareCz.py
@@ -23,6 +23,7 @@ from module.plugins.Account import Account
import re
from module.utils import parseFileSize
+
class MultishareCz(Account):
__name__ = "MultishareCz"
__version__ = "0.02"
@@ -30,29 +31,29 @@ class MultishareCz(Account):
__description__ = """multishare.cz account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
TRAFFIC_LEFT_PATTERN = r'<span class="profil-zvyrazneni">Kredit:</span>\s*<strong>(?P<S>[0-9,]+)&nbsp;(?P<U>\w+)</strong>'
ACCOUNT_INFO_PATTERN = r'<input type="hidden" id="(u_ID|u_hash)" name="[^"]*" value="([^"]+)">'
def loadAccountInfo(self, user, req):
#self.relogin(user)
- html = req.load("http://www.multishare.cz/profil/", decode = True)
-
- found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
+ html = req.load("http://www.multishare.cz/profil/", decode=True)
+
+ found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
trafficleft = parseFileSize(found.group('S'), found.group('U')) / 1024 if found else 0
- self.premium = True if trafficleft else False
-
- html = req.load("http://www.multishare.cz/", decode = True)
+ self.premium = True if trafficleft else False
+
+ html = req.load("http://www.multishare.cz/", decode=True)
mms_info = dict(re.findall(self.ACCOUNT_INFO_PATTERN, html))
return dict(mms_info, **{"validuntil": -1, "trafficleft": trafficleft})
-
+
def login(self, user, data, req):
- html = req.load('http://www.multishare.cz/html/prihlaseni_process.php', post = {
- "akce": "Přihlásit",
+ html = req.load('http://www.multishare.cz/html/prihlaseni_process.php', post={
+ "akce": "Přihlásit",
"heslo": data['password'],
"jmeno": user
- }, decode = True)
-
+ }, decode=True)
+
if '<div class="akce-chyba akce">' in html:
self.wrongPassword() \ No newline at end of file
diff --git a/pyload/plugins/accounts/NetloadIn.py b/pyload/plugins/accounts/NetloadIn.py
index cef3e298b..3e3bd93c1 100755
--- a/pyload/plugins/accounts/NetloadIn.py
+++ b/pyload/plugins/accounts/NetloadIn.py
@@ -17,10 +17,12 @@
@author: mkaay
"""
-from module.plugins.Account import Account
import re
from time import time
+from module.plugins.Account import Account
+
+
class NetloadIn(Account):
__name__ = "NetloadIn"
__version__ = "0.22"
@@ -41,9 +43,11 @@ class NetloadIn(Account):
validuntil = None
premium = False
trafficleft = None
- return {"validuntil": validuntil, "trafficleft": trafficleft, "premium" : premium}
-
- def login(self, user, data,req):
- page = req.load("http://netload.in/index.php", None, { "txtuser" : user, "txtpass" : data['password'], "txtcheck" : "login", "txtlogin" : "Login"}, cookies=True)
+ return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}
+
+ def login(self, user, data, req):
+ page = req.load("http://netload.in/index.php", None,
+ {"txtuser": user, "txtpass": data['password'], "txtcheck": "login", "txtlogin": "Login"},
+ cookies=True)
if "password or it might be invalid!" in page:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/Premium4Me.py b/pyload/plugins/accounts/Premium4Me.py
index 3b0d24488..7f49cca30 100644
--- a/pyload/plugins/accounts/Premium4Me.py
+++ b/pyload/plugins/accounts/Premium4Me.py
@@ -1,4 +1,3 @@
-
from pyload.plugins.MultiHoster import MultiHoster
class Premium4Me(MultiHoster):
@@ -18,11 +17,12 @@ class Premium4Me(MultiHoster):
return account_info
def login(self, user, data, req):
- self.authcode = req.load("http://premium.to/api/getauthcode.php?username=%s&password=%s" % (user, data["password"])).strip()
-
+ self.authcode = req.load("http://premium.to/api/getauthcode.php?username=%s&password=%s" % (
+ user, data["password"])).strip()
+
if "wrong username" in self.authcode:
self.wrongPassword()
def loadHosterList(self, req):
page = req.load("http://premium.to/api/hosters.php?authcode=%s" % self.authcode)
- return [x.strip() for x in page.replace("\"", "").split(";")] \ No newline at end of file
+ return [x.strip() for x in page.replace("\"", "").split(";")]
diff --git a/pyload/plugins/accounts/PremiumizeMe.py b/pyload/plugins/accounts/PremiumizeMe.py
index e8c2d277f..02faf0e75 100644
--- a/pyload/plugins/accounts/PremiumizeMe.py
+++ b/pyload/plugins/accounts/PremiumizeMe.py
@@ -7,12 +7,10 @@ class PremiumizeMe(MultiHoster):
__version__ = "0.11"
__type__ = "account"
__description__ = """Premiumize.Me account plugin"""
-
__author_name__ = ("Florian Franzen")
__author_mail__ = ("FlorianFranzen@gmail.com")
def loadAccountInfo(self, user, req):
-
# Get user data from premiumize.me
status = self.getAccountStatus(user, req)
self.logDebug(status)
@@ -27,7 +25,6 @@ class PremiumizeMe(MultiHoster):
return account_info
def login(self, user, data, req):
-
# Get user data from premiumize.me
status = self.getAccountStatus(user, req)
@@ -35,19 +32,18 @@ class PremiumizeMe(MultiHoster):
if status['status'] != 200:
self.wrongPassword()
-
def getAccountStatus(self, user, req):
-
- # Use premiumize.me API v1 (see https://secure.premiumize.me/?show=api) to retrieve account info and return the parsed json answer
+ # Use premiumize.me API v1 (see https://secure.premiumize.me/?show=api)
+ # to retrieve account info and return the parsed json answer
answer = req.load(
"https://api.premiumize.me/pm-api/v1.php?method=accountstatus&params[login]=%s&params[pass]=%s" % (
- user, self.password))
+ user, self.accounts[user]['password']))
return json_loads(answer)
def loadHosterList(self, req):
-
- # Get supported hosters list from premiumize.me using the json API v1 (see https://secure.premiumize.me/?show=api)
+ # Get supported hosters list from premiumize.me using the
+ # json API v1 (see https://secure.premiumize.me/?show=api)
answer = req.load(
"https://api.premiumize.me/pm-api/v1.php?method=hosterlist&params[login]=%s&params[pass]=%s" % (
self.loginname, self.password))
diff --git a/pyload/plugins/accounts/QuickshareCz.py b/pyload/plugins/accounts/QuickshareCz.py
index 94649cc43..1af7cbffd 100644
--- a/pyload/plugins/accounts/QuickshareCz.py
+++ b/pyload/plugins/accounts/QuickshareCz.py
@@ -21,6 +21,7 @@ import re
from module.plugins.Account import Account
from module.utils import parseFileSize
+
class QuickshareCz(Account):
__name__ = "QuickshareCz"
__version__ = "0.01"
@@ -28,26 +29,26 @@ class QuickshareCz(Account):
__description__ = """quickshare.cz account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
def loadAccountInfo(self, user, req):
- html = req.load("http://www.quickshare.cz/premium", decode = True)
-
- found = re.search(r'Stav kreditu: <strong>(.+?)</strong>', html)
+ html = req.load("http://www.quickshare.cz/premium", decode=True)
+
+ found = re.search(r'Stav kreditu: <strong>(.+?)</strong>', html)
if found:
- trafficleft = parseFileSize(found.group(1)) / 1024
+ trafficleft = parseFileSize(found.group(1)) / 1024
premium = True if trafficleft else False
else:
trafficleft = None
- premium = False
+ premium = False
return {"validuntil": -1, "trafficleft": trafficleft, "premium": premium}
-
+
def login(self, user, data, req):
- html = req.load('http://www.quickshare.cz/html/prihlaseni_process.php', post = {
+ html = req.load('http://www.quickshare.cz/html/prihlaseni_process.php', post={
"akce": u'Přihlásit',
"heslo": data['password'],
"jmeno": user
- }, decode = True)
-
+ }, decode=True)
+
if u'>Takový uživatel neexistuje.<' in html or u'>Špatné heslo.<' in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/RapidgatorNet.py b/pyload/plugins/accounts/RapidgatorNet.py
index 85adc71a3..8a02b712c 100644
--- a/pyload/plugins/accounts/RapidgatorNet.py
+++ b/pyload/plugins/accounts/RapidgatorNet.py
@@ -17,11 +17,10 @@
@author: zoidberg
"""
-import re
from module.plugins.Account import Account
-from module.utils import parseFileSize
from module.common.json_layer import json_loads
+
class RapidgatorNet(Account):
__name__ = "RapidgatorNet"
__version__ = "0.04"
@@ -29,24 +28,24 @@ class RapidgatorNet(Account):
__description__ = """rapidgator.net account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
API_URL = 'http://rapidgator.net/api/user'
-
+
def loadAccountInfo(self, user, req):
try:
- sid = self.getAccountData(user).get('SID')
+ sid = self.getAccountData(user).get('SID')
assert sid
-
+
json = req.load("%s/info?sid=%s" % (self.API_URL, sid))
- self.logDebug("API:USERINFO", json)
+ self.logDebug("API:USERINFO", json)
json = json_loads(json)
-
+
if json['response_status'] == 200:
if "reset_in" in json['response']:
self.scheduleRefresh(user, json['response']['reset_in'])
-
- return {"validuntil": json['response']['expire_date'],
- "trafficleft": int(json['response']['traffic_left']) / 1024,
+
+ return {"validuntil": json['response']['expire_date'],
+ "trafficleft": int(json['response']['traffic_left']) / 1024,
"premium": True}
else:
self.logError(json['response_details'])
@@ -54,21 +53,19 @@ class RapidgatorNet(Account):
self.logError(e)
return {"validuntil": None, "trafficleft": None, "premium": False}
-
- def login(self, user, data, req):
+
+ def login(self, user, data, req):
try:
- json = req.load('%s/login' % self.API_URL,
- post = {"username": user,
- "password": data['password']})
+ json = req.load('%s/login' % self.API_URL, post={"username": user, "password": data['password']})
self.logDebug("API:LOGIN", json)
- json = json_loads(json)
-
+ json = json_loads(json)
+
if json['response_status'] == 200:
data['SID'] = str(json['response']['session_id'])
- return
+ return
else:
self.logError(json['response_details'])
except Exception, e:
self.logError(e)
-
+
self.wrongPassword()
diff --git a/pyload/plugins/accounts/RapidshareCom.py b/pyload/plugins/accounts/RapidshareCom.py
index 15722e099..b2066cd1e 100644
--- a/pyload/plugins/accounts/RapidshareCom.py
+++ b/pyload/plugins/accounts/RapidshareCom.py
@@ -19,6 +19,7 @@
from module.plugins.Account import Account
+
class RapidshareCom(Account):
__name__ = "RapidshareCom"
__version__ = "0.22"
@@ -26,11 +27,12 @@ class RapidshareCom(Account):
__description__ = """Rapidshare.com account plugin"""
__author_name__ = ("mkaay")
__author_mail__ = ("mkaay@mkaay.de")
-
+
def loadAccountInfo(self, user, req):
data = self.getAccountData(user)
api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi"
- api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user, "password": data["password"], "withcookie": 1}
+ api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user,
+ "password": data["password"], "withcookie": 1}
src = req.load(api_url_base, cookies=False, get=api_param_prem)
if src.startswith("ERROR"):
raise Exception(src)
@@ -41,20 +43,21 @@ class RapidshareCom(Account):
continue
k, v = t.split("=")
info[k] = v
-
+
validuntil = int(info["billeduntil"])
premium = True if validuntil else False
- tmp = {"premium": premium, "validuntil": validuntil, "trafficleft":-1, "maxtraffic":-1}
+ tmp = {"premium": premium, "validuntil": validuntil, "trafficleft": -1, "maxtraffic": -1}
return tmp
-
+
def login(self, user, data, req):
api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi"
- api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user, "password": data["password"], "withcookie": 1}
+ api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user,
+ "password": data["password"], "withcookie": 1}
src = req.load(api_url_base, cookies=False, get=api_param_prem)
if src.startswith("ERROR"):
- raise Exception(src+"### Note you have to use your account number for login, instead of name.")
+ raise Exception(src + "### Note you have to use your account number for login, instead of name.")
fields = src.split("\n")
info = {}
for t in fields:
@@ -64,5 +67,3 @@ class RapidshareCom(Account):
info[k] = v
cj = self.getAccountCookies(user)
cj.setCookie("rapidshare.com", "enc", info["cookie"])
-
-
diff --git a/pyload/plugins/accounts/RarefileNet.py b/pyload/plugins/accounts/RarefileNet.py
index 90ad02d43..f4ae4a79a 100644
--- a/pyload/plugins/accounts/RarefileNet.py
+++ b/pyload/plugins/accounts/RarefileNet.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class RarefileNet(XFSPAccount):
__name__ = "RarefileNet"
__version__ = "0.02"
@@ -8,5 +9,5 @@ class RarefileNet(XFSPAccount):
__description__ = """RareFile.net account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
MAIN_PAGE = "http://rarefile.net/"
diff --git a/pyload/plugins/accounts/RealdebridCom.py b/pyload/plugins/accounts/RealdebridCom.py
index 9460fc815..5dda02c85 100644
--- a/pyload/plugins/accounts/RealdebridCom.py
+++ b/pyload/plugins/accounts/RealdebridCom.py
@@ -1,8 +1,7 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
+import xml.dom.minidom as dom
from module.plugins.MultiHoster import MultiHoster
-import xml.dom.minidom as dom
+
class RealdebridCom(MultiHoster):
__name__ = "RealdebridCom"
@@ -20,16 +19,16 @@ class RealdebridCom(MultiHoster):
return account_info
- def login(self, req):
- page = req.load("https://real-debrid.com/ajax/login.php?user=%s&pass=%s" % (self.loginname, self.password))
- #page = req.load("https://real-debrid.com/login.html", post={"user": user, "pass": data["password"]}, cookies=True)
+ def login(self, user, data, req):
+ page = req.load("https://real-debrid.com/ajax/login.php", get={"user": user, "pass": data["password"]})
+ # page = req.load("https://real-debrid.com/login.html",
+ # post={"user": user, "pass": data["password"]}, cookies=True)
if "Your login informations are incorrect" in page:
self.wrongPassword()
-
def loadHosterList(self, req):
https = "https" if self.getConfig("https") else "http"
page = req.load(https + "://real-debrid.com/api/hosters.php").replace("\"","").strip()
- return[x.strip() for x in page.split(",") if x.strip()] \ No newline at end of file
+ return[x.strip() for x in page.split(",") if x.strip()]
diff --git a/pyload/plugins/accounts/RehostTo.py b/pyload/plugins/accounts/RehostTo.py
index e1cb2668f..58c91801b 100644
--- a/pyload/plugins/accounts/RehostTo.py
+++ b/pyload/plugins/accounts/RehostTo.py
@@ -9,9 +9,7 @@ class RehostTo(Account):
__author_name__ = ("RaNaN")
__author_mail__ = ("RaNaN@pyload.org")
-
def loadAccountInfo(self, user, req):
-
data = self.getAccountData(user)
page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data["password"]))
data = [x.split("=") for x in page.split(",")]
@@ -33,5 +31,3 @@ class RehostTo(Account):
if "Login failed." in page:
self.wrongPassword()
-
-
diff --git a/pyload/plugins/accounts/ReloadCc.py b/pyload/plugins/accounts/ReloadCc.py
index e4cb32c42..b3c26c6d3 100644
--- a/pyload/plugins/accounts/ReloadCc.py
+++ b/pyload/plugins/accounts/ReloadCc.py
@@ -1,9 +1,10 @@
-from module.plugins.Account import Account
+from module.plugins.Account import Account
from module.common.json_layer import json_loads
from module.network.HTTPRequest import BadHeader
+
class ReloadCc(Account):
__name__ = "ReloadCc"
__version__ = "0.3"
@@ -37,7 +38,6 @@ class ReloadCc(Account):
if status['status'] != "ok":
self.wrongPassword()
-
def getAccountStatus(self, user, req):
# Use reload.cc API v1 to retrieve account info and return the parsed json answer
query_params = dict(
diff --git a/pyload/plugins/accounts/RyushareCom.py b/pyload/plugins/accounts/RyushareCom.py
index f734eb11b..484de2d7a 100644
--- a/pyload/plugins/accounts/RyushareCom.py
+++ b/pyload/plugins/accounts/RyushareCom.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class RyushareCom(XFSPAccount):
__name__ = "RyushareCom"
__version__ = "0.03"
@@ -8,11 +9,12 @@ class RyushareCom(XFSPAccount):
__description__ = """ryushare.com account plugin"""
__author_name__ = ("zoidberg", "trance4us")
__author_mail__ = ("zoidberg@mujmail.cz", "")
-
+
MAIN_PAGE = "http://ryushare.com/"
-
+
def login(self, user, data, req):
req.lastURL = "http://ryushare.com/login.python"
- html = req.load("http://ryushare.com/login.python", post={"login": user, "password": data["password"], "op": "login"})
- if 'Incorrect Login or Password' in html or '>Error<' in html:
- self.wrongPassword() \ No newline at end of file
+ html = req.load("http://ryushare.com/login.python",
+ post={"login": user, "password": data["password"], "op": "login"})
+ if 'Incorrect Login or Password' in html or '>Error<' in html:
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/Share76Com.py b/pyload/plugins/accounts/Share76Com.py
index 9c946ae50..1dfcd8510 100644
--- a/pyload/plugins/accounts/Share76Com.py
+++ b/pyload/plugins/accounts/Share76Com.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class Share76Com(XFSPAccount):
__name__ = "Share76Com"
__version__ = "0.02"
diff --git a/pyload/plugins/accounts/ShareFilesCo.py b/pyload/plugins/accounts/ShareFilesCo.py
index 0d8ea6635..cff52d570 100644
--- a/pyload/plugins/accounts/ShareFilesCo.py
+++ b/pyload/plugins/accounts/ShareFilesCo.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class ShareFilesCo(XFSPAccount):
__name__ = "ShareFilesCo"
__version__ = "0.01"
diff --git a/pyload/plugins/accounts/ShareRapidCom.py b/pyload/plugins/accounts/ShareRapidCom.py
index f8043449c..b532768b1 100644
--- a/pyload/plugins/accounts/ShareRapidCom.py
+++ b/pyload/plugins/accounts/ShareRapidCom.py
@@ -4,44 +4,45 @@ import re
from time import mktime, strptime
from module.plugins.Account import Account
+
class ShareRapidCom(Account):
__name__ = "ShareRapidCom"
__version__ = "0.32"
__type__ = "account"
__description__ = """ShareRapid account plugin"""
__author_name__ = ("MikyWoW", "zoidberg")
-
+
login_timeout = 60
-
+
def loadAccountInfo(self, user, req):
src = req.load("http://share-rapid.com/mujucet/", decode=True)
-
+
found = re.search(ur'<td>Max. počet paralelních stahování: </td><td>(\d+)', src)
if found:
data = self.getAccountData(user)
data["options"]["limitDL"] = [int(found.group(1))]
-
+
found = re.search(ur'<td>Paušální stahování aktivní. Vyprší </td><td><strong>(.*?)</strong>', src)
if found:
validuntil = mktime(strptime(found.group(1), "%d.%m.%Y - %H:%M"))
- return {"premium": True, "trafficleft": -1, "validuntil": validuntil}
-
+ return {"premium": True, "trafficleft": -1, "validuntil": validuntil}
+
found = re.search(r'<tr><td>GB:</td><td>(.*?) GB', src)
if found:
trafficleft = float(found.group(1)) * (1 << 20)
return {"premium": True, "trafficleft": trafficleft, "validuntil": -1}
-
+
return {"premium": False, "trafficleft": None, "validuntil": None}
def login(self, user, data, req):
htm = req.load("http://share-rapid.com/prihlaseni/", cookies=True)
if "Heslo:" in htm:
start = htm.index('id="inp_hash" name="hash" value="')
- htm = htm[start+33:]
+ htm = htm[start + 33:]
hashes = htm[0:32]
htm = req.load("http://share-rapid.com/prihlaseni/",
post={"hash": hashes,
- "login": user,
+ "login": user,
"pass1": data["password"],
"remember": 0,
- "sbmt": u"Přihlásit"}, cookies=True) \ No newline at end of file
+ "sbmt": u"Přihlásit"}, cookies=True)
diff --git a/pyload/plugins/accounts/ShareonlineBiz.py b/pyload/plugins/accounts/ShareonlineBiz.py
index fe2b412db..03babb5e6 100644
--- a/pyload/plugins/accounts/ShareonlineBiz.py
+++ b/pyload/plugins/accounts/ShareonlineBiz.py
@@ -19,6 +19,7 @@
from module.plugins.Account import Account
+
class ShareonlineBiz(Account):
__name__ = "ShareonlineBiz"
__version__ = "0.24"
@@ -29,7 +30,7 @@ class ShareonlineBiz(Account):
def getUserAPI(self, user, req):
return req.load("http://api.share-online.biz/account.php",
- {"username": user, "password": self.accounts[user]["password"], "act": "userDetails"})
+ {"username": user, "password": self.accounts[user]["password"], "act": "userDetails"})
def loadAccountInfo(self, user, req):
src = self.getUserAPI(user, req)
@@ -53,4 +54,4 @@ class ShareonlineBiz(Account):
def login(self, user, data, req):
src = self.getUserAPI(user, req)
if "EXCEPTION" in src:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/SpeedLoadOrg.py b/pyload/plugins/accounts/SpeedLoadOrg.py
index 4eb2b52de..bb9fb05fb 100644
--- a/pyload/plugins/accounts/SpeedLoadOrg.py
+++ b/pyload/plugins/accounts/SpeedLoadOrg.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class SpeedLoadOrg(XFSPAccount):
__name__ = "SpeedLoadOrg"
__version__ = "0.01"
diff --git a/pyload/plugins/accounts/StahnuTo.py b/pyload/plugins/accounts/StahnuTo.py
index 8a4523bc5..6e2b1c96d 100644
--- a/pyload/plugins/accounts/StahnuTo.py
+++ b/pyload/plugins/accounts/StahnuTo.py
@@ -17,9 +17,11 @@
@author: zoidberg
"""
+import re
+
from module.plugins.Account import Account
from module.utils import parseFileSize
-import re
+
class StahnuTo(Account):
__name__ = "StahnuTo"
@@ -28,22 +30,22 @@ class StahnuTo(Account):
__description__ = """StahnuTo account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
#login_timeout = 60
- def loadAccountInfo(self, user, req):
+ def loadAccountInfo(self, user, req):
html = req.load("http://www.stahnu.to/")
-
+
found = re.search(r'>VIP: (\d+.*)<', html)
- trafficleft = parseFileSize(found.group(1)) * 1024 if found else 0
+ trafficleft = parseFileSize(found.group(1)) * 1024 if found else 0
return {"premium": trafficleft > (512 * 1024), "trafficleft": trafficleft, "validuntil": -1}
- def login(self, user, data, req):
+ def login(self, user, data, req):
html = req.load("http://www.stahnu.to/login.php", post={
"username": user,
"password": data["password"],
"submit": "Login"})
-
+
if not '<a href="logout.php">' in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/TurbobitNet.py b/pyload/plugins/accounts/TurbobitNet.py
index c4b819131..5d4471c30 100644
--- a/pyload/plugins/accounts/TurbobitNet.py
+++ b/pyload/plugins/accounts/TurbobitNet.py
@@ -17,10 +17,12 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
import re
from time import mktime, strptime
+from module.plugins.Account import Account
+
+
class TurbobitNet(Account):
__name__ = "TurbobitNet"
__version__ = "0.01"
@@ -28,12 +30,12 @@ class TurbobitNet(Account):
__description__ = """TurbobitNet account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
#login_timeout = 60
- def loadAccountInfo(self, user, req):
+ def loadAccountInfo(self, user, req):
html = req.load("http://turbobit.net")
-
+
found = re.search(r'<u>Turbo Access</u> to ([0-9.]+)', html)
if found:
premium = True
@@ -46,11 +48,11 @@ class TurbobitNet(Account):
def login(self, user, data, req):
req.cj.setCookie("turbobit.net", "user_lang", "en")
-
+
html = req.load("http://turbobit.net/user/login", post={
"user[login]": user,
"user[pass]": data["password"],
"user[submit]": "Login"})
-
+
if not '<div class="menu-item user-name">' in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/UlozTo.py b/pyload/plugins/accounts/UlozTo.py
index 6652c8b7c..dc59db9cc 100644
--- a/pyload/plugins/accounts/UlozTo.py
+++ b/pyload/plugins/accounts/UlozTo.py
@@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
-from module.plugins.Account import Account
import re
+from module.plugins.Account import Account
+
+
class UlozTo(Account):
__name__ = "UlozTo"
__version__ = "0.04"
@@ -10,27 +12,27 @@ class UlozTo(Account):
__description__ = """uloz.to account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="http://www.ulozto.net/kredit" title="[^"]*?GB = ([0-9.]+) MB"'
def loadAccountInfo(self, user, req):
#this cookie gets lost somehow after each request
- self.phpsessid = req.cj.getCookie("ULOSESSID")
- html = req.load("http://www.ulozto.net/", decode = True)
- req.cj.setCookie("www.ulozto.net", "ULOSESSID", self.phpsessid)
-
+ self.phpsessid = req.cj.getCookie("ULOSESSID")
+ html = req.load("http://www.ulozto.net/", decode=True)
+ req.cj.setCookie("www.ulozto.net", "ULOSESSID", self.phpsessid)
+
found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
- trafficleft = int(float(found.group(1).replace(' ','').replace(',','.')) * 1000 / 1.024) if found else 0
+ trafficleft = int(float(found.group(1).replace(' ', '').replace(',', '.')) * 1000 / 1.024) if found else 0
self.premium = True if trafficleft else False
-
+
return {"validuntil": -1, "trafficleft": trafficleft}
-
+
def login(self, user, data, req):
- html = req.load('http://www.ulozto.net/login?do=loginForm-submit', post = {
+ html = req.load('http://www.ulozto.net/login?do=loginForm-submit', post={
"login": "Submit",
"password": data['password'],
- "username": user
- }, decode = True)
-
+ "username": user
+ }, decode=True)
+
if '<ul class="error">' in html:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/UploadedTo.py b/pyload/plugins/accounts/UploadedTo.py
index d202018f2..ac1f3fd35 100644
--- a/pyload/plugins/accounts/UploadedTo.py
+++ b/pyload/plugins/accounts/UploadedTo.py
@@ -17,10 +17,12 @@
@author: mkaay
"""
-from module.plugins.Account import Account
import re
from time import time
+from module.plugins.Account import Account
+
+
class UploadedTo(Account):
__name__ = "UploadedTo"
__version__ = "0.26"
@@ -28,7 +30,7 @@ class UploadedTo(Account):
__description__ = """ul.net account plugin"""
__author_name__ = ("mkaay")
__author_mail__ = ("mkaay@mkaay.de")
-
+
def loadAccountInfo(self, user, req):
req.load("http://uploaded.net/language/en")
@@ -48,18 +50,19 @@ class UploadedTo(Account):
raw_valid = re.findall(r"(\d+) (Week|weeks|days|day|hours|hour)", raw_valid)
validuntil = time()
for n, u in raw_valid:
- validuntil += 3600 * int(n) * {"Week": 168, "weeks": 168, "days": 24, "day": 24, "hours": 1, "hour": 1}[u]
+ validuntil += 3600 * int(n) * {"Week": 168, "weeks": 168, "days": 24,
+ "day": 24, "hours": 1, "hour": 1}[u]
- return {"validuntil":validuntil, "trafficleft":traffic, "maxtraffic":50*1024*1024}
+ return {"validuntil": validuntil, "trafficleft": traffic, "maxtraffic": 50 * 1024 * 1024}
else:
- return {"premium" : False, "validuntil" : -1}
+ return {"premium": False, "validuntil": -1}
def login(self, user, data, req):
req.load("http://uploaded.net/language/en")
req.cj.setCookie("uploaded.net", "lang", "en")
-
- page = req.load("http://uploaded.net/io/login", post={ "id" : user, "pw" : data["password"], "_" : ""})
+
+ page = req.load("http://uploaded.net/io/login", post={"id": user, "pw": data["password"], "_": ""})
if "User and password do not match!" in page:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/UploadheroCom.py b/pyload/plugins/accounts/UploadheroCom.py
index 18ed69ae6..0e64a3ff5 100644
--- a/pyload/plugins/accounts/UploadheroCom.py
+++ b/pyload/plugins/accounts/UploadheroCom.py
@@ -1,8 +1,12 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+import re
+import datetime
+import time
+
from module.plugins.Account import Account
-import re,datetime,time
+
class UploadheroCom(Account):
__name__ = "UploadheroCom"
@@ -12,7 +16,6 @@ class UploadheroCom(Account):
__author_name__ = ("mcmyst")
__author_mail__ = ("mcmyst@hotmail.fr")
-
def loadAccountInfo(self, user, req):
premium_pattern = re.compile('Il vous reste <span class="bleu">([0-9]+)</span> jours premium.')
@@ -20,16 +23,17 @@ class UploadheroCom(Account):
page = req.load("http://uploadhero.com/my-account")
if premium_pattern.search(page):
- end_date = datetime.date.today() + datetime.timedelta(days=int(premium_pattern.search(page).group(1)))
- end_date = time.mktime(future.timetuple())
- account_info = {"validuntil": end_date, "trafficleft": -1, "premium": True}
+ end_date = datetime.date.today() + datetime.timedelta(days=int(premium_pattern.search(page).group(1)))
+ end_date = time.mktime(future.timetuple())
+ account_info = {"validuntil": end_date, "trafficleft": -1, "premium": True}
else:
- account_info = {"validuntil": -1, "trafficleft": -1, "premium": False}
+ account_info = {"validuntil": -1, "trafficleft": -1, "premium": False}
return account_info
def login(self, user, data, req):
- page = req.load("http://uploadhero.com/lib/connexion.php", post={"pseudo_login": user, "password_login": data["password"]})
+ page = req.load("http://uploadhero.com/lib/connexion.php",
+ post={"pseudo_login": user, "password_login": data["password"]})
if "mot de passe invalide" in page:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/UploadingCom.py b/pyload/plugins/accounts/UploadingCom.py
index 507e4ab18..d13df4f9d 100644
--- a/pyload/plugins/accounts/UploadingCom.py
+++ b/pyload/plugins/accounts/UploadingCom.py
@@ -17,10 +17,12 @@
@author: mkaay
"""
-from module.plugins.Account import Account
from time import time, strptime, mktime
import re
+from module.plugins.Account import Account
+
+
class UploadingCom(Account):
__name__ = "UploadingCom"
__version__ = "0.1"
@@ -28,25 +30,26 @@ class UploadingCom(Account):
__description__ = """uploading.com account plugin"""
__author_name__ = ("mkaay")
__author_mail__ = ("mkaay@mkaay.de")
-
+
def loadAccountInfo(self, user, req):
src = req.load("http://uploading.com/")
premium = True
if "UPGRADE TO PREMIUM" in src:
return {"validuntil": -1, "trafficleft": -1, "premium": False}
-
+
m = re.search("Valid Until:(.*?)<", src)
if m:
validuntil = int(mktime(strptime(m.group(1).strip(), "%b %d, %Y")))
else:
validuntil = -1
-
+
return {"validuntil": validuntil, "trafficleft": -1, "premium": True}
-
+
def login(self, user, data, req):
req.cj.setCookie("uploading.com", "lang", "1")
req.cj.setCookie("uploading.com", "language", "1")
req.cj.setCookie("uploading.com", "setlang", "en")
req.cj.setCookie("uploading.com", "_lang", "en")
req.load("http://uploading.com/")
- req.load("http://uploading.com/general/login_form/?JsHttpRequest=%s-xml" % long(time()*1000), post={"email": user, "password": data["password"], "remember": "on"})
+ req.load("http://uploading.com/general/login_form/?JsHttpRequest=%s-xml" % long(time() * 1000),
+ post={"email": user, "password": data["password"], "remember": "on"})
diff --git a/pyload/plugins/accounts/UploadstationCom.py b/pyload/plugins/accounts/UploadstationCom.py
index e86cec7ce..040f6bbef 100644
--- a/pyload/plugins/accounts/UploadstationCom.py
+++ b/pyload/plugins/accounts/UploadstationCom.py
@@ -2,6 +2,7 @@
from module.plugins.accounts.FilejungleCom import FilejungleCom
+
class UploadstationCom(FilejungleCom):
__name__ = "UploadstationCom"
__version__ = "0.1"
@@ -9,5 +10,5 @@ class UploadstationCom(FilejungleCom):
__description__ = """uploadstation.com account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
URL = "http://uploadstation.com/"
diff --git a/pyload/plugins/accounts/UptoboxCom.py b/pyload/plugins/accounts/UptoboxCom.py
index b07991817..7fc62694a 100644
--- a/pyload/plugins/accounts/UptoboxCom.py
+++ b/pyload/plugins/accounts/UptoboxCom.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from module.plugins.internal.XFSPAccount import XFSPAccount
+
class UptoboxCom(XFSPAccount):
__name__ = "UptoboxCom"
__version__ = "0.01"
@@ -8,5 +9,5 @@ class UptoboxCom(XFSPAccount):
__description__ = """DDLStorage.com account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
- MAIN_PAGE = "http://uptobox.com/" \ No newline at end of file
+
+ MAIN_PAGE = "http://uptobox.com/"
diff --git a/pyload/plugins/accounts/WarserverCz.py b/pyload/plugins/accounts/WarserverCz.py
index 21961956b..2c871eb6d 100644
--- a/pyload/plugins/accounts/WarserverCz.py
+++ b/pyload/plugins/accounts/WarserverCz.py
@@ -17,10 +17,11 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
import re
+
+from module.plugins.Account import Account
from module.utils import parseFileSize
-from time import mktime, strptime
+
class WarserverCz(Account):
__name__ = "WarserverCz"
@@ -29,42 +30,39 @@ class WarserverCz(Account):
__description__ = """Warserver.cz account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
VALID_UNTIL_PATTERN = ur'<li>Neomezené stahování do: <strong>(.+?)<'
TRAFFIC_LEFT_PATTERN = ur'<li>Kredit: <strong>(.+?)<'
-
+
DOMAIN = "http://www.warserver.cz"
- def loadAccountInfo(self, user, req):
- html = req.load("%s/uzivatele/prehled" % self.DOMAIN, decode = True)
-
+ def loadAccountInfo(self, user, req):
+ html = req.load("%s/uzivatele/prehled" % self.DOMAIN, decode=True)
+
validuntil = trafficleft = None
premium = False
-
+
found = re.search(self.VALID_UNTIL_PATTERN, html)
if found:
self.logDebug("VALID_UNTIL", found.group(1))
- try:
+ try:
#validuntil = mktime(strptime(found.group(1), "%d %B %Y"))
premium = True
trafficleft = -1
except Exception, e:
self.logError(e)
-
+
found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
if found:
self.logDebug("TRAFFIC_LEFT", found.group(1))
- trafficleft = parseFileSize((found.group(1).replace("&thinsp;",""))) // 1024
- premium = True if trafficleft > 1 << 18 else False
-
- return ({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium})
-
+ trafficleft = parseFileSize((found.group(1).replace("&thinsp;", ""))) // 1024
+ premium = True if trafficleft > 1 << 18 else False
+
+ return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}
+
def login(self, user, data, req):
- html = req.load('%s/uzivatele/prihlaseni?do=prihlaseni-submit' % self.DOMAIN,
- post = {"username": user,
- "password": data['password'],
- "send": u"Přihlásit"},
- decode = True)
-
- if '<p class="chyba">' in html:
- self.wrongPassword() \ No newline at end of file
+ html = req.load('%s/uzivatele/prihlaseni?do=prihlaseni-submit' % self.DOMAIN,
+ post={"username": user, "password": data['password'], "send": u"Přihlásit"}, decode=True)
+
+ if '<p class="chyba">' in html:
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/WuploadCom.py b/pyload/plugins/accounts/WuploadCom.py
index 3d9ddfffa..2a8bfee8e 100644
--- a/pyload/plugins/accounts/WuploadCom.py
+++ b/pyload/plugins/accounts/WuploadCom.py
@@ -22,6 +22,7 @@ from types import MethodType
from module.plugins.Account import Account
from module.common.json_layer import json_loads
+
class WuploadCom(Account):
__name__ = "WuploadCom"
__version__ = "0.1"
@@ -44,4 +45,4 @@ class WuploadCom(Account):
def getDomain(self, req):
xml = req.load(self.API_URL + "/utility?method=getWuploadDomainForCurrentIp&format=json",
decode=True)
- return json_loads(xml)["FSApi_Utility"]["getWuploadDomainForCurrentIp"]["response"] \ No newline at end of file
+ return json_loads(xml)["FSApi_Utility"]["getWuploadDomainForCurrentIp"]["response"]
diff --git a/pyload/plugins/accounts/X7To.py b/pyload/plugins/accounts/X7To.py
index 90f65d55e..34a7b99be 100644
--- a/pyload/plugins/accounts/X7To.py
+++ b/pyload/plugins/accounts/X7To.py
@@ -22,6 +22,7 @@ from time import strptime, mktime
from module.plugins.Account import Account
+
class X7To(Account):
__name__ = "X7To"
__version__ = "0.1"
@@ -45,7 +46,8 @@ class X7To(Account):
else:
valid = 0
- trafficleft = re.search(r'<em style="white-space:nowrap">([\d]*[,]?[\d]?[\d]?) (KB|MB|GB)</em>', page, re.IGNORECASE)
+ trafficleft = re.search(r'<em style="white-space:nowrap">([\d]*[,]?[\d]?[\d]?) (KB|MB|GB)</em>',
+ page, re.IGNORECASE)
if trafficleft:
units = float(trafficleft.group(1).replace(",", "."))
pow = {'KB': 0, 'MB': 1, 'GB': 2}[trafficleft.group(2)]
@@ -55,12 +57,11 @@ class X7To(Account):
return {"trafficleft": trafficleft, "validuntil": valid}
-
def login(self, user, data, req):
#req.cj.setCookie("share.cx", "lang", "english")
page = req.load("http://x7.to/lang/en", None, {})
page = req.load("http://x7.to/james/login", None,
- {"redirect": "http://www.x7.to/", "id": user, "pw": data['password'], "submit": "submit"})
+ {"redirect": "http://www.x7.to/", "id": user, "pw": data['password'], "submit": "submit"})
if "Username and password are not matching." in page:
self.wrongPassword()
diff --git a/pyload/plugins/accounts/YibaishiwuCom.py b/pyload/plugins/accounts/YibaishiwuCom.py
index e2aa6f11d..c4eab74dc 100644
--- a/pyload/plugins/accounts/YibaishiwuCom.py
+++ b/pyload/plugins/accounts/YibaishiwuCom.py
@@ -17,9 +17,11 @@
@author: zoidberg
"""
-from module.plugins.Account import Account
import re
+from module.plugins.Account import Account
+
+
class YibaishiwuCom(Account):
__name__ = "YibaishiwuCom"
__version__ = "0.01"
@@ -32,20 +34,20 @@ class YibaishiwuCom(Account):
def loadAccountInfo(self, user, req):
#self.relogin(user)
- html = req.load("http://115.com/", decode = True)
-
+ html = req.load("http://115.com/", decode=True)
+
found = re.search(self.ACCOUNT_INFO_PATTERN, html, re.S)
premium = True if (found and 'is_vip: 1' in found.group(1)) else False
validuntil = trafficleft = (-1 if found else 0)
return dict({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium})
def login(self, user, data, req):
- html = req.load('http://passport.115.com/?ac=login', post = {
+ html = req.load('http://passport.115.com/?ac=login', post={
"back": "http://www.115.com/",
"goto": "http://115.com/",
"login[account]": user,
"login[passwd]": data['password']
- }, decode = True)
+ }, decode=True)
if not 'var USER_PERMISSION = {' in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/ZeveraCom.py b/pyload/plugins/accounts/ZeveraCom.py
index 61a66cd89..13ed95133 100644
--- a/pyload/plugins/accounts/ZeveraCom.py
+++ b/pyload/plugins/accounts/ZeveraCom.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
+from time import mktime, strptime
+
from module.plugins.Account import Account
-import re
-from time import mktime, strptime
class ZeveraCom(Account):
__name__ = "ZeveraCom"
@@ -10,17 +10,17 @@ class ZeveraCom(Account):
__type__ = "account"
__description__ = """Zevera.com account plugin"""
__author_name__ = ("zoidberg")
- __author_mail__ = ("zoidberg@mujmail.cz")
-
- def loadAccountInfo(self, user, req):
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ def loadAccountInfo(self, user, req):
data = self.getAPIData(req)
if data == "No traffic":
account_info = {"trafficleft": 0, "validuntil": 0, "premium": False}
else:
account_info = {
"trafficleft": int(data['availabletodaytraffic']) * 1024,
- "validuntil": mktime(strptime(data['endsubscriptiondate'],"%Y/%m/%d %H:%M:%S")),
- "premium": True
+ "validuntil": mktime(strptime(data['endsubscriptiondate'], "%Y/%m/%d %H:%M:%S")),
+ "premium": True
}
return account_info
@@ -29,8 +29,8 @@ class ZeveraCom(Account):
self.password = data["password"]
if self.getAPIData(req) == "No traffic":
self.wrongPassword()
-
- def getAPIData(self, req, just_header = False, **kwargs):
+
+ def getAPIData(self, req, just_header=False, **kwargs):
get_data = {
'cmd': 'accountinfo',
'login': self.loginname,
@@ -38,12 +38,14 @@ class ZeveraCom(Account):
}
get_data.update(kwargs)
- response = req.load("http://www.zevera.com/jDownloader.ashx", get = get_data, decode = True, just_header = just_header)
+ response = req.load("http://www.zevera.com/jDownloader.ashx", get=get_data,
+ decode=True, just_header=just_header)
self.logDebug(response)
if ':' in response:
if not just_header:
- response = response.replace(',','\n')
- return dict((y.strip().lower(), z.strip()) for (y,z) in [x.split(':',1) for x in response.splitlines() if ':' in x])
+ response = response.replace(',', '\n')
+ return dict((y.strip().lower(), z.strip()) for (y, z) in
+ [x.split(':', 1) for x in response.splitlines() if ':' in x])
else:
- return response \ No newline at end of file
+ return response