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

import re

from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo


class DataHuFolder(SimpleCrypter):
    __name__    = "DataHuFolder"
    __type__    = "crypter"
    __version__ = "0.06"

    __pattern__ = r'http://(?:www\.)?data\.hu/dir/\w+'
    __config__  = [("use_premium"       , "bool", "Use premium account if available"   , True),
                   ("use_subfolder"     , "bool", "Save package to subfolder"          , True),
                   ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]

    __description__ = """Data.hu folder decrypter plugin"""
    __license__     = "GPLv3"
    __authors__     = [("crash", None),
                       ("stickell", "<EMAIL>")]


    LINK_PATTERN = r'<a href=\'(http://data\.hu/get/.+)\' target=\'_blank\'>\1</a>'
    NAME_PATTERN = ur'<title>(?P<N>.+) Let\xf6lt\xe9se</title>'


    def prepare(self):
        super(DataHuFolder, self).prepare()

        if u'K\xe9rlek add meg a jelsz\xf3t' in self.html:  # Password protected<commit_msg>Update DataHuFolder.py<commit_after># -*- coding: utf-8 -*-

import re

from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo


class DataHuFolder(SimpleCrypter):
    __name__    = "DataHuFolder"
    __type__    = "crypter"
    __version__ = "0.07"

    __pattern__ = r'http://(?:www\.)?data\.hu/dir/\w+'
    __config__  = [("use_premium"       , "bool", "Use premium account if available"   , True),
                   ("use_subfolder"     , "bool", "Save package to subfolder"          , True),
                   ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]

    __description__ = """Data.hu folder decrypter plugin"""
    __license__     = "GPLv3"
    __authors__     = [("crash", None),
                       ("stickell", "<EMAIL>")]


    LINK_PATTERN = r'<a href=\'(http://data\.hu/get/.+)\' target=\'_blank\'>\1</a>'
    NAME_PATTERN = ur'<title>(?P<N>.+?) Let\xf6lt\xe9se</title>'


    def prepare(self):
        super(DataHuFolder, self).prepare()

        if u'K\xe9rlek add meg a jelsz\xf3t' in self.html:  # Password protected
{'fraction_non_alphanumeric': 0.1636197440585009, 'fraction_numerical': 0.009140767824497258, 'mean_word_length': 2.594417077175698, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6186729', 'n_tokens_mistral': 787, 'n_tokens_neox': 736, 'n_words': 156}