View Single Post
  #3  
Old 07.06.2019, 12:37
thecoder2012's Avatar
thecoder2012 thecoder2012 is offline
Official 9kw.eu Support
 
Join Date: Feb 2013
Location: Internet
Posts: 1,324
Default

Quote:
Originally Posted by blacksun View Post
ist es möglich bei einem bestimmten Guthabenstand bei einem CES das als Ereignis zu definieren und dann eine Aktion auszulösen?

Konkretes Vorhaben1:
Wenn Guthaben bei 9kw unter 100, deaktiviere 9kw-Solver
Vollständiges Beispiel:
Code:
// CES Aktion mit Prüfung vom Guthabenstand
// Trigger Required: Interval
var min_credits = 100;

var settings_9kw = "org.jdownloader.captcha.v2.solver.solver9kw.Captcha9kwSettings";
var apikey = callAPI("config", "get", settings_9kw, null, "ApiKey");
var prio = callAPI("config", "get", settings_9kw, null, "prio");
var confirm = callAPI("config", "get", settings_9kw, null, "confirm");
var https = callAPI("config", "get", settings_9kw, null, "https");
var credits_page = '://www.9kw.eu/index.cgi?action=usercaptchaguthaben&apikey=' + apikey;
var credits;
if (https == 1) {
    credits = getPage("https" + credits_page);
} else {
    credits = getPage("http" + credits_page);
}

if (credits.match(/^\d+$/)) {
    if (parseInt(credits) < min_credits) {
        callAPI("config", "set", "jd.controlling.captcha.CaptchaSettings", null, "captchamode", "SKIP_ALL"); //setDownloadsPaused(true);
    } else {
        callAPI("config", "set", "jd.controlling.captcha.CaptchaSettings", null, "captchamode", "NORMAL"); //setDownloadsPaused(false);
    }
}
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep.
Reply With Quote