diff options
| author | 2014-10-18 13:48:21 +0200 | |
|---|---|---|
| committer | 2014-10-18 13:48:21 +0200 | |
| commit | 5224a71f0dc30d640754a9fa64c7c54fa3ec4fb9 (patch) | |
| tree | 1a30a9ac6e8edd5432428e54fe2fee725f605bab /module/plugins | |
| parent | [XFSPCrypter] Better LINK_PATTERN (diff) | |
| download | pyload-5224a71f0dc30d640754a9fa64c7c54fa3ec4fb9.tar.xz | |
[XFSPAccount] Set HOSTER_NAME (instead HOSTER_URL) as the mandatory attribute
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/internal/XFSPAccount.py | 21 | 
1 files changed, 17 insertions, 4 deletions
diff --git a/module/plugins/internal/XFSPAccount.py b/module/plugins/internal/XFSPAccount.py index f75422ca1..713bf827d 100644 --- a/module/plugins/internal/XFSPAccount.py +++ b/module/plugins/internal/XFSPAccount.py @@ -13,7 +13,7 @@ from module.utils import parseFileSize  class XFSPAccount(Account):      __name__ = "XFSPAccount"      __type__ = "account" -    __version__ = "0.12" +    __version__ = "0.13"      __description__ = """XFileSharingPro account plugin"""      __license__ = "GPLv3" @@ -21,9 +21,19 @@ class XFSPAccount(Account):                     ("Walter Purcaro", "vuolter@gmail.com")] -    HOSTER_URL = None +    """ +    Following patterns should be defined by each hoster: -    COOKIES = None  #: or list of tuples [(domain, name, value)] +      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_NAME = None + +    COOKIES = [(HOSTER_NAME, "lang", "english")]  #: or list of tuples [(domain, name, value)]      VALID_UNTIL_PATTERN = r'>Premium.[Aa]ccount expire:.*?<b>(.+?)</b>' @@ -32,7 +42,10 @@ class XFSPAccount(Account):      LOGIN_FAIL_PATTERN = r'>(Incorrect Login or Password|Error<)' -    # PREMIUM_PATTERN = r'>Renew premium<' + +    def init(self): +        if not hasattr(self, "HOSTER_URL"): +            self.HOSTER_URL = "http://%s/" % self.HOSTER_NAME      def loadAccountInfo(self, user, req):  | 
