summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/XFSAccount.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-04 23:42:46 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-04 23:42:46 +0100
commitf74309f89923317eeaaca31d74dff10590ed3d40 (patch)
tree9958a3ed001d54238b9fb8efcbd4516384b596fe /module/plugins/internal/XFSAccount.py
parentFix missing urlparse import (diff)
downloadpyload-f74309f89923317eeaaca31d74dff10590ed3d40.tar.xz
[XFSHoster] Use URL_REPLACEMENTS to clean url
Diffstat (limited to 'module/plugins/internal/XFSAccount.py')
-rw-r--r--module/plugins/internal/XFSAccount.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index 6a3b3605e..6e34409ed 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -2,8 +2,8 @@
import re
-from urlparse import urljoin
from time import gmtime, mktime, strptime
+from urlparse import urljoin
from module.plugins.Account import Account
from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies
@@ -23,14 +23,12 @@ class XFSAccount(Account):
"""
Following patterns should be defined by each hoster:
- HOSTER_URL: (optional)
- example: HOSTER_URL = r'linestorage.com'
-
PREMIUM_PATTERN: (optional) Checks if the account is premium
example: PREMIUM_PATTERN = r'>Renew premium'
"""
HOSTER_DOMAIN = None
+ HOSTER_URL = None
COOKIES = [(HOSTER_DOMAIN, "lang", "english")]
@@ -51,8 +49,8 @@ class XFSAccount(Account):
# if not self.HOSTER_DOMAIN:
# self.fail(_("Missing HOSTER_DOMAIN"))
- if not hasattr(self, "HOSTER_URL"):
- self.HOSTER_URL = "http://www.%s/" % self.HOSTER_DOMAIN.replace("www.", "", 1)
+ if not self.HOSTER_URL:
+ self.HOSTER_URL = "http://www.%s/" % self.HOSTER_DOMAIN
def loadAccountInfo(self, user, req):