#81
|
||||
|
||||
![]()
You could directly query the 9kw api in your script
**External links are only visible to Support Staff**www.9kw.eu/api.html and parse the server response for the queue size. I suggest to ask mgpai for help how to make http request and parse answer
__________________
JD-Dev & Server-Admin |
#82
|
|||
|
|||
![]()
@mgpai
I hope you can help me. if a file is premium-only and you dont have an premium-account, the file is skipped, saying that there is no account. at the bottom of JD, you get an icon: ![]() if you click on that icon, the skipped status get removed and JD is trying these links again. my Intension: doing this automatically all 60 minutes --> remove skipped-status every 60 minutes - only links with "skipped no account" should be affected, not other links with other status - there is a difference between reseting a link and removing skipped-status (=click on the icon). is it possible to remove skipped-status only (i prefer) via script? Thx
__________________
-- Viele Grüße BlackSun |
#83
|
|||
|
|||
![]() Quote:
Code:
// Unskip 'account missing' links at user specified interval // Trigger Required : "Interval" // Set interval to 3600000 (60 minutes) var links = getAllDownloadLinks(); for (i = 0; i < links.length; i++) { var link = links[i]; if (link.isSkipped() && link.getSkippedReason() == "NO_ACCOUNT") { link.setSkipped(false); } } |
#84
|
|||
|
|||
![]()
Check RSS Feeds
Code:
// Check RSS feeds // Trigger Required: "Interval" // Set interval to 3600000 (1 Hour) or more var users = []; // <- Specify the youtube user IDs to check, e.g. ["cnn","bbc","nbc"] if (interval >= 3600000) { var links = []; for (i = 0; i < users.length; i++) { var user = users[i]; var content = JSON.parse(getPage("**External links are only visible to Support Staff** + user)); var items = content.items ? content.items : []; for (j = 0; j < items.length; j++) { var item = items[j]; links.push(item.link); } } callAPI("linkgrabberv2", "addLinks", { "links": links.join(" "), "autostart": null // <- Set to 'true' (without quotes) to autostart the downloads }); } Last edited by Jiaz; 03.05.2017 at 15:23. |
#85
|
|||
|
|||
![]() Quote:
Thanks! :D |
#86
|
|||
|
|||
![]()
Hi, mgpai. I need a script that allows JDownloader to monitor a Youtube playlist or channel and automatically download new videos. In other words, if a new video is uploaded every day, JDownloader would detect that and download it without further intervention. Thank you for any help.
|
#87
|
|||
|
|||
![]()
@IceRad12,
You can use the script in Post #84 to monitor the RSS feeds to get recent videos from channels by specifying the usernames of those channels. Check your PM for link to a similar script which can be used for playlists. To automatically download the links after adding them to JD, you have to set 'autostart' to 'true' in the scripts. |
#88
|
|||
|
|||
![]() Quote:
|
#89
|
||||
|
||||
![]()
Please provide a screenshot of the script and error message
__________________
JD-Dev & Server-Admin |
#90
|
|||
|
|||
![]()
Hi, i got that working reading the stats file from 9kw. But i need to know how to set a stopmark in event scripter. I can't find the method. I checked how is this done via myJD and found a method setStopMark in DowndoadsV2.
How can i access this method from scripter? Thanks |
#91
|
|||
|
|||
![]()
Solved via Chat.
Quote:
Code:
callAPI("downloadsV2", "setStopMark", linkUUID, -1); Set stop mark on package: Code:
callAPI("downloadsV2", "setStopMark", -1, packageUUID); Remove stop mark: Code:
callAPI("downloadsV2", "removeStopMark"); |
#92
|
|||
|
|||
![]()
Thanks mgpai!!
|
#93
|
||||
|
||||
![]() Quote:
Quote:
Code:
// Queue check for 9kw.eu // Trigger Required: Interval var newInterval = 10000; if (interval == newInterval) { check9kw_queue(); } else { interval = newInterval; } function check9kw_queue() { var settings_9kw = "org.jdownloader.captcha.v2.solver.solver9kw.Captcha9kwSettings"; var https = callAPI("config", "get", settings_9kw, null, "https"); var servercheck_page = '://www.9kw.eu/grafik/servercheck.json'; var servercheck; for (var i = 0; i < 3; i++) { if (https == 1) { servercheck = getPage("https" + servercheck_page); } else { servercheck = getPage("http" + servercheck_page); } if (IsValidJSONString(servercheck)) { var queue = JSON.parse(servercheck).queue; if (parseInt(queue) > 100) { //callAPI("downloadsV2", "setStopMark", linkUUID, -1);//Set stop mark on link //callAPI("downloadsV2", "setStopMark", -1, packageUUID);//Set stop mark on package setDownloadsPaused(true); //alert("High queue. " + "(" + queue + ")"); } else { //callAPI("downloadsV2", "removeStopMark");//Remove stop mark setDownloadsPaused(false); } break; } } } function IsValidJSONString(str) { if (typeof str !== "string") { return false; } try { JSON.parse(str); } catch (e) { return false; } return true; } And one example for credits: Code:
// Check for enough credits (captcha service 9kw.eu) // Trigger Required: Interval var newInterval = 30000; if(interval == newInterval){ check9kw_credits(); }else{ interval = newInterval; } function check9kw_credits (){ 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+$/)) { var min_credits = 30; if (confirm) { min_credits += 6; } if (prio) { min_credits += parseInt(prio); } if (parseInt(credits) < min_credits) { setDownloadsPaused(true); //alert("Not enough credits. " + "(" + credits + ")"); }else{ setDownloadsPaused(false); } } } Another example for 'account missing' and 'skipped - captcha input': Code:
// Unskip 'account missing' and 'skipped - captcha input' links at user specified interval // Trigger Required : "Interval" // Set interval to 3600000 (60 minutes) var newInterval = 3600000; if (interval == newInterval) { check_skipped(); } else { interval = newInterval; } function check_skipped() { var links = getAllDownloadLinks(); for (i = 0; i < links.length; i++) { var link = links[i]; if (link.isSkipped()) { if (link.getSkippedReason() == "CAPTCHA" || link.getSkippedReason() == "NO_ACCOUNT") { link.setSkipped(false); } } } }
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep. ![]() Last edited by thecoder2012; 27.05.2019 at 06:59. |
#94
|
||||
|
||||
![]()
@thecoder2012: very NICE!
Just for your information, you could add your own remoteapi commands from your solver to api , for example callAPI("9kw", "getCredits"); contact us if you need help with this
__________________
JD-Dev & Server-Admin |
#95
|
||||
|
||||
![]()
fyi, problem with using pause mode is sets download speed limit also. So stop marks are probably better if you don't want this to happen, on the assumption that it's the same function in GUI as API call.
raztoki
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#96
|
|||
|
|||
![]()
Many thanks thecoder2012!! I'm testing the script i wrote for this problem and will share it as i have it working.
:thumbup: |
#97
|
|||
|
|||
![]()
Hey MPGAI,
I have a little problem but nothing big for you ![]() Backround: I wrote a Batch script which automatically deletes "Proof" and "Sample" (Files and Folder) cause I dont need them. I also tried to set exclusions in the unrar extension of JD but nevertheless the files would be unpacked. What I need: The Batch Script is finish and works fine but I have no Idea how I could start the Batch Script after Unrar. I allready tried to abuse the predefined "Play Sound after Unrar Script" ![]() ![]() ![]() So can you please help me to start my batch script after JD unrar the downloaded movie packages? ![]() |
#98
|
|||
|
|||
![]()
Can use either of the following, with trigger "Archive extraction Finished".
Synchronous: Code:
callSync("cmd","/c","c:/myFolder/myBatch.bat"); Asynchronous: Code:
callAsync(function(){},"cmd","/c","c:/myFolder/myBatch.bat"); |
#99
|
|||
|
|||
![]()
Hi,
I'm looking for a way to save all comments from the comment column into a package to a txt file. could you please kindly help with a script for this? :-) |
#100
|
|||
|
|||
![]()
@0r3n,
There are two types of comments in JD. 'link' and 'package' comments. Do you mean save comments from all individual links of a package ... Quote:
|
![]() |
Thread Tools | |
Display Modes | |
|
|