<commit_before># -*- coding: utf-8 -*-

import re

from time import mktime, strptime, gmtime

from module.plugins.internal.XFSPAccount import XFSPAccount


class EasybytezCom(XFSPAccount):
    __name__    = "EasybytezCom"
    __type__    = "account"
    __version__ = "0.08"

    __description__ = """EasyBytez.com account plugin"""
    __license__     = "GPLv3"
    __authors__     = [("zoidberg", "<EMAIL>"),
                       ("guidobelix", "<EMAIL>")]


    HOSTER_NAME = "easybytez.com"


    def loadAccountInfo(self, user, req):
        html = req.load(self.HOSTER_URL, get={'op': "my_account"}, decode=True)

        validuntil = None
        trafficleft = None
        premium = False

        m = re.search(self.VALID_UNTIL_PATTERN, html)
        if m:
            expiredate = m.group(1)
            self.logDebug("Expire date: " + expiredate)

            try:
                validuntil = mktime(strptime(expiredate, "%d %B %Y"))
            except Exception, e:
                self.logError(e)

            if validuntil > mktime(gmtime()):
                premium = True
                trafficleft = -1
            else:
                premium = False
                validuntil = -1

        m = re.search(self.TRAFFIC_LEFT_PATTERN, html)
        if m:
            trafficleft = m.group(1)
            if "Unlimited" in trafficleft:
                trafficleft = -1
            else:
                trafficleft = self.parseTraffic(trafficleft)

        return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}<commit_msg>[EasybytezCom] Remove unnecessary loadAccountInfo method<commit_after># -*- coding: utf-8 -*-

import re

from time import mktime, strptime, gmtime

from module.plugins.internal.XFSPAccount import XFSPAccount


class EasybytezCom(XFSPAccount):
    __name__    = "EasybytezCom"
    __type__    = "account"
    __version__ = "0.08"

    __description__ = """EasyBytez.com account plugin"""
    __license__     = "GPLv3"
    __authors__     = [("zoidberg", "<EMAIL>"),
                       ("guidobelix", "<EMAIL>")]


    HOSTER_NAME = "easybytez.com"
{'fraction_non_alphanumeric': 0.11404335532516494, 'fraction_numerical': 0.00706880301602262, 'mean_word_length': 2.108345534407028, 'pattern_counts': {'":': 3, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2635486', 'n_tokens_mistral': 691, 'n_tokens_neox': 656, 'n_words': 145}