summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-28 20:40:00 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-28 20:40:00 +0100
commit0d27fda4b6edbfcba9b78b2c3f91063b8464455a (patch)
tree4d094829d9419506868768c90686a11b5b4bae85 /module/plugins/internal
parentMerge pull request #928 from Gummibaer/patch-1 (diff)
downloadpyload-0d27fda4b6edbfcba9b78b2c3f91063b8464455a.tar.xz
[XFSAccount] Fix leech traffic detection
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/XFSAccount.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index f2a4e8a15..5a265c08a 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies
class XFSAccount(Account):
__name__ = "XFSAccount"
__type__ = "account"
- __version__ = "0.30"
+ __version__ = "0.31"
__description__ = """XFileSharing account plugin"""
__license__ = "GPLv3"
@@ -109,12 +109,12 @@ class XFSAccount(Account):
else:
self.logDebug("TRAFFIC_LEFT_PATTERN not found")
- m = re.finditer(self.LEECH_TRAFFIC_PATTERN, html)
- if m:
+ leech = [m.groupdict() for m in re.finditer(self.LEECH_TRAFFIC_PATTERN, html)]
+ if leech:
leechtraffic = 0
try:
- for leech in m:
- size = leech['S']
+ for traffic in leech:
+ size = traffic['S']
if "nlimited" in size:
leechtraffic = -1
@@ -122,8 +122,8 @@ class XFSAccount(Account):
validuntil = -1
break
else:
- if 'U' in leech:
- unit = leech['U']
+ if 'U' in traffic:
+ unit = traffic['U']
elif isinstance(self.LEECH_TRAFFIC_UNIT, basestring):
unit = self.LEECH_TRAFFIC_UNIT
else: