From 8b569a22d9a5b12cc492e97d4cee28deb75a81ed Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Mon, 16 Jan 2012 17:39:27 +0100 Subject: workaround premium4.me overcharging --- module/plugins/accounts/Premium4Me.py | 6 +++--- module/plugins/accounts/ShareonlineBiz.py | 7 ++++--- module/plugins/hoster/BezvadataCz.py | 2 +- module/plugins/hoster/Premium4Me.py | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/accounts/Premium4Me.py b/module/plugins/accounts/Premium4Me.py index c8c4064ef..de4fdc219 100644 --- a/module/plugins/accounts/Premium4Me.py +++ b/module/plugins/accounts/Premium4Me.py @@ -2,7 +2,7 @@ from module.plugins.Account import Account class Premium4Me(Account): __name__ = "Premium4Me" - __version__ = "0.01" + __version__ = "0.02" __type__ = "account" __description__ = """Premium4.me account plugin""" __author_name__ = ("RaNaN", "zoidberg") @@ -17,7 +17,7 @@ class Premium4Me(Account): return account_info def login(self, user, data, req): - self.authcode = req.load("http://premium4.me/api/getauthcode.php?username=%s&password=%s" % (user, data["password"]))[:-1] - + self.authcode = req.load("http://premium4.me/api/getauthcode.php?username=%s&password=%s" % (user, data["password"])).strip() + if "wrong username" in self.authcode: self.wrongPassword() \ No newline at end of file diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 967142204..426f5a6a9 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -23,7 +23,7 @@ import re class ShareonlineBiz(Account): __name__ = "ShareonlineBiz" - __version__ = "0.2" + __version__ = "0.21" __type__ = "account" __description__ = """share-online.biz account plugin""" __author_name__ = ("mkaay") @@ -33,8 +33,9 @@ class ShareonlineBiz(Account): src = req.load("http://api.share-online.biz/account.php?username=%s&password=%s&act=userDetails" % (user, self.accounts[user]["password"])) info = {} for line in src.splitlines(): - key, value = line.split("=") - info[key] = value + if "=" in line: + key, value = line.split("=") + info[key] = value return info def loadAccountInfo(self, user, req): diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index f061fa2b5..680bbc173 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -29,7 +29,7 @@ class BezvadataCz(SimpleHoster): __author_mail__ = ("zoidberg@mujmail.cz") FILE_NAME_PATTERN = r'

Soubor: (?P[^<]+)

' - FILE_SIZE_PATTERN = r'
  • Velikost: (?P[0-9.]+) (?P[kKMG])i?)
  • ' + FILE_SIZE_PATTERN = r'
  • Velikost: (?P[^<]+)
  • ' FILE_OFFLINE_PATTERN = r'BezvaData \| Soubor nenalezen' DOWNLOAD_FORM_PATTERN = r'
    ' diff --git a/module/plugins/hoster/Premium4Me.py b/module/plugins/hoster/Premium4Me.py index beccdf572..d029b3df1 100644 --- a/module/plugins/hoster/Premium4Me.py +++ b/module/plugins/hoster/Premium4Me.py @@ -6,7 +6,7 @@ from module.plugins.Hoster import Hoster class Premium4Me(Hoster): __name__ = "Premium4Me" - __version__ = "0.02" + __version__ = "0.03" __type__ = "hoster" __pattern__ = r"http://premium4.me/.*" @@ -16,6 +16,7 @@ class Premium4Me(Hoster): def setup(self): self.resumeDownload = True + self.chunkLimit = 1 def process(self, pyfile): if not self.account: -- cgit v1.2.3