Exemple #1
0
def inited():
    # set default delay if not set
    delays = hpx.get_setting("network", "delays", {})
    delay_url = URLS['ch']
    if delay_url not in delays:
        log.info(f"Setting delay on {delay_url} requests to {DEFAULT_DELAY}")
        delays[delay_url] = DEFAULT_DELAY
        hpx.update_setting("network", "delays", delays)
Exemple #2
0
def inited():
    # set default delay values if not set
    delays = hpx.get_setting("network", "delays", {})
    for u in (URLS['ex'], URLS['eh'], "https://api.e-hentai.org",
              URLS['ex_api']):
        if u not in delays:
            log.info(f"Setting delay on {u} requests to {DEFAULT_DELAY}")
            delays[u] = DEFAULT_DELAY
            hpx.update_setting("network", "delays", delays)
Exemple #3
0
def inited():
    PLUGIN_CONFIG.update(hpx.get_plugin_config())

    # set default delay values if not set
    delays = hpx.get_setting("network", "delays", {})
    for u in (URLS['nh'], ):
        if u not in delays:
            log.info(f"Setting delay on {u} requests to {DEFAULT_DELAY}")
            delays[u] = DEFAULT_DELAY
            hpx.update_setting("network", "delays", delays)
Exemple #4
0
def inited():
    plugin_config.update(hpx.get_plugin_config())

    # set default delay values if not set
    delays = hpx.get_setting("network", "delays", {})
    for u in (urls['ex'], urls['eh'], "https://api.e-hentai.org"):
        if u not in delays:
            log.info(f"Setting delay on {u} requests to {default_delay}")
            delays[u] = default_delay
            hpx.update_setting("network", "delays", delays)
Exemple #5
0
def inited():
    # set default delay values if not set
    delays = hpx.get_setting("network", "delays", {})
    for u in (MAIN_URLS['ex'], MAIN_URLS['eh']):
        if u not in delays:
            log.info(f"Setting delay on {u} requests to {default_delay}")
            delays[u] = default_delay
            hpx.update_setting("network", "delays", delays)

    # retrieve saved user info
    if os.path.exists(save_file):
        with open(save_file, "rb") as f:
            user_dict = pickle.load(f)
        if user_dict:
            login(user_dict, {})
            if response is not None:
                log.info("Successfully re-logged in")