summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/accounts/RapidfileshareNet.py4
-rw-r--r--module/plugins/accounts/TusfilesNet.py4
-rw-r--r--module/plugins/internal/XFSPAccount.py5
3 files changed, 5 insertions, 8 deletions
diff --git a/module/plugins/accounts/RapidfileshareNet.py b/module/plugins/accounts/RapidfileshareNet.py
index 63207acbb..5ca05fd91 100644
--- a/module/plugins/accounts/RapidfileshareNet.py
+++ b/module/plugins/accounts/RapidfileshareNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSPAccount import XFSPAccount
class RapidfileshareNet(XFSPAccount):
__name__ = "RapidfileshareNet"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__description__ = """Rapidfileshare.net account plugin"""
__license__ = "GPLv3"
@@ -15,4 +15,4 @@ class RapidfileshareNet(XFSPAccount):
HOSTER_NAME = "rapidfileshare.net"
- TRAFFIC_LEFT_PATTERN = r'>Traffic available today:</TD><TD><label for="name">\s*(?P<S>[\d.,]+)\s*(?P<U>[\w^_]+)\s*</label></TD></TR>'
+ TRAFFIC_LEFT_PATTERN = r'>Traffic available today:</TD><TD><label for="name">\s*(?P<S>[\d.,]+)\s*(?:(?P<U>[\w^_]+))?'
diff --git a/module/plugins/accounts/TusfilesNet.py b/module/plugins/accounts/TusfilesNet.py
index dcb9fa104..65f35a8e2 100644
--- a/module/plugins/accounts/TusfilesNet.py
+++ b/module/plugins/accounts/TusfilesNet.py
@@ -11,7 +11,7 @@ from module.utils import parseFileSize
class TusfilesNet(XFSPAccount):
__name__ = "TusfilesNet"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__description__ = """ Tusfile.net account plugin """
__license__ = "GPLv3"
@@ -21,4 +21,4 @@ class TusfilesNet(XFSPAccount):
HOSTER_NAME = "tusfiles.net"
VALID_UNTIL_PATTERN = r'<span class="label label-default">([^<]+)</span>'
- TRAFFIC_LEFT_PATTERN = r'<td><img src="//www\.tusfiles\.net/i/icon/meter\.png" alt=""/></td>\n<td>&nbsp;(?P<S>[\d.,]+)\s*(?P<U>[\w^_]+)\s*</td>'
+ TRAFFIC_LEFT_PATTERN = r'<td><img src="//www\.tusfiles\.net/i/icon/meter\.png" alt=""/></td>\n<td>&nbsp;(?P<S>[\d.,]+)'
diff --git a/module/plugins/internal/XFSPAccount.py b/module/plugins/internal/XFSPAccount.py
index c2d779c29..d420adbb6 100644
--- a/module/plugins/internal/XFSPAccount.py
+++ b/module/plugins/internal/XFSPAccount.py
@@ -98,10 +98,7 @@ class XFSPAccount(Account):
except:
pass
- if premium is None:
- premium = False
-
- return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium}
+ return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium or False}
def login(self, user, data, req):