#2841
|
||||
|
||||
@hideas
Looking into my dev-tools, missav.com does not use the "Origin" header for its oqn reuqests. It is only used when you play the video and their CDN host "surrit.com" is accessed.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2842
|
|||
|
|||
@pspzockerscene you are most likely right, and I should elaborate:
I do not know very well the workings behind headers and requests, All my script did is when url containing **External links are only visible to Support Staff****External links are only visible to Support Staff** is copied to clipboard, it tries to search page source, and add the m3u8 to the linkgrabber list, which was the CDN host link, which was getting blocked by the cloudflare. now, when i used myBrowser.setHeader(Origin, "**External links are only visible to Support Staff**); I could use the same browser object within the script to display the content of the CDN link m3u8 (successfully shows HLS format 0001.ts 0002.ts 0003.ts whatever etc). If I dont use those headers, it gets blocked 403 when I try to display content. so that is how I knew the Origin header was the one I needed to pass to the browser/API/whatever. That is all i know regarding the headers. Last edited by hideas; 28.03.2024 at 04:18. |
#2843
|
||||
|
||||
The problem is that whenever the plugin-system would work solely with those ".m3u8" URLs again, it does not know anything about those headers needed to get around Cloudflare so your attempt was doomed to fail.
For this to work, you'd need to be able to set specific headers and/or cookies on all URLs you are returning to the plugin system to tell it "please use those headers". Afaik this isn't possible yet.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2844
|
|||
|
|||
yup and sure enough I was not able to complete the script to working condition.
I used calling yt-dlp as a workaround because that one does seem to have such function(--add-headers), but you updated the JD plugin to have quality selection so I can just use that now. thanks again for that. In any case, for me was good to try to make my own fixes just for fun and to learn stuff. |
#2845
|
||||
|
||||
Thanks for your feedback and yes, when it comes to settings on such a level, yt-dlp is prividng more flexibility.
Keep in mind that the current plugin is still a shaky thing: It only needs one factor such as Cloudflare kicking in to make it fail^^ Have a nice easter
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2846
|
|||
|
|||
I Hope that site managers stay sleepy ;P
Will do, you too! |
#2847
|
||||
|
||||
REQUEST: 100% Working script for convert all YT audio files to MP3 320 Kbps bitrate
This script work for all audio files but only in MP3 128 Kbps:
Alternate version (2021.11.04) https://board.jdownloader.org/showpo...61&postcount=1 With the Trigger in Event Scripter activated "A Download stopped", and automatically delete all original files. Here is the script for convert YT audio files to MP3 320 Kbps bitrate, works correctly but not for all files: https://board.jdownloader.org/showpo...postcount=1654 Look, in the MP3 128 Kbps option has this line of text: var output = input.replace(/(aac|m4a|ogg|opus)$/, "mp3"); In the other script for MP3 320 Kbps all the words are written, but the text |opus is missing: var output = link.downloadPath.replace(/(.+\.)(aac|m4a|ogg)$/i, "$1mp3"); I believe that exists something wrong with this text, opus audio files, any help for 100% working script? Last edited by dataDyne; 01.04.2024 at 15:40. |
#2848
|
|||
|
|||
Try replacing:
Code:
var output = link.downloadPath.replace(/(.+\.)(aac|m4a|ogg)$/i, "$1mp3"); Code:
var output = link.downloadPath.replace(/(.+\.)(aac|m4a|ogg|opus)$/i, "$1mp3"); |
#2849
|
|||
|
|||
Quote:
Anybody can help me? A Script which allows a Reconnect only every x Minutes. "If last reconnect is shorter than 5 minutes then delay reconnect to match 5 minutes" Last edited by thomaz; 04.04.2024 at 22:24. |
#2850
|
|||
|
|||
Quote:
Code:
/* trigger : before a reconnect */ var next = getProperty("next", true); while (Date.now() < next) { sleep(1000); } Code:
/* trigger : after a reconnect */ var x = 5 // <- wait time in minuites var next = Date.now() + x * 60000; setProperty("next", next, true); |
#2851
|
||||
|
||||
@mgpai: I would recommend following, "after reconnect" , store global property timestamp and disable auto reconnect , and interval script that checks for timestamp and after timeout, remove property and enable auto reconnect.
__________________
JD-Dev & Server-Admin |
#2852
|
|||
|
|||
Had considered it. If JD is closed/restarted while 'auto-reconnect' is disabled, the 'property' will be lost and auto-reonncect will remain disabled after the restart. The user will then have to remember to manually enable it again.
|
#2853
|
||||
|
||||
But all users using this script want auto reconnect to be enabled in general so maybe [optionally] always enable it if the property does not exist (?)
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2854
|
||||
|
||||
:)
__________________
JD-Dev & Server-Admin |
#2855
|
|||
|
|||
Quote:
I don't really see any advantage in this method or disadvantage in the current solution. But if you/Jiaz feel otherwise I will gladly implement it. |
#2856
|
||||
|
||||
Nah I don't mind - it's the user who wants that script. I'd wait for his feedback.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2857
|
|||
|
|||
Quote:
After reconnect > disable auto-reconnect > sleep x seconds > re-enable auto-reconnect. |
#2858
|
|||
|
|||
Quote:
Code:
/* trigger : after a reconnect */ var x = 5; // <- wait time in minutes var setAutoReconnectEnabled = function(boolean) { callAPI("config", "set", "jd.controlling.reconnect.ReconnectConfig", null, "AutoReconnectEnabled", boolean); } setAutoReconnectEnabled(false); sleep(x * 60000); setAutoReconnectEnabled(true); Code:
/* trigger : jdownloader started */ callAPI("config", "set", "jd.controlling.reconnect.ReconnectConfig", null, "AutoReconnectEnabled", true); |
#2859
|
||||
|
||||
@mgpai: Thanks for the nice solution!
__________________
JD-Dev & Server-Admin |
#2860
|
|||
|
|||
|
#2861
|
||||
|
||||
@mgpai: please send mail to support@jdownloader.org so we can discuss about this api and what it should be capable of
__________________
JD-Dev & Server-Admin |
#2862
|
|||
|
|||
Quote:
|
#2863
|
|||
|
|||
thx a lot.
this is what im using atm. had to insert a stop and startDownloads because, when autoreconnect got disabled after a reconnect, the files still had the 1hr timer running down and didnt start to download. Code:
/* trigger : after a reconnect */ var x = 4; // <- wait time in minutes var setAutoReconnectEnabled = function(boolean) { callAPI("config", "set", "jd.controlling.reconnect.ReconnectConfig", null, "AutoReconnectEnabled", boolean); } setAutoReconnectEnabled(false); stopDownloads(); sleep(5000); startDownloads(); sleep(x * 60000); setAutoReconnectEnabled(true); Last edited by thomaz; 11.04.2024 at 00:13. |
#2864
|
||||
|
||||
@thomaz: Thanks fot the feedback and for sharing your script
__________________
JD-Dev & Server-Admin |
#2865
|
||||
|
||||
Can you please explain this little further? after a reconnect, every file that has waiting time should be auto reset and not continue to wait.
__________________
JD-Dev & Server-Admin |
#2866
|
|||
|
|||
The Script disables "AutoReconnect" and due to this the timer still runs down although a reconnect was done.
I then have to "STOP" and "START" again manually. Video: **External links are only visible to Support Staff**... youtube.com/watch?v=wrbIoH8_m4w I enable AutoReconnect. Reconnect runs. After succsessful reconnect the script unchecks "AutoReconnect". The download wait timer still runs down. Have to do a "STOP" und "START" manually. OFFTOPIC: During 1fichier download i have high usage on 1 thread. What does 1fichier do there? Mining? When my cpu is throttled down to 800mhz i only get 2mb/s in free mode, instead of 5mb/s. Last edited by thomaz; 11.04.2024 at 15:41. |
#2867
|
||||
|
||||
Quote:
https://support.jdownloader.org/de/k...ng-downloading --> Hint: The 1fichier plugin has a "Prefer https" setting.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2868
|
|||
|
|||
Ahhh ... totally forgot ... ecryption. *disable*
thx a lot EDIT: Disabled it, but it continues using https. maybe the hoster is https only? No matter, now i know where the cpu usage comes from. always thought the sites are mining or smthg like that. Otherwise mining for faster free ddls. How a bout that? ... *RapidgatorCeoAskFeatureRequest* Last edited by thomaz; 11.04.2024 at 20:25. |
#2869
|
||||
|
||||
@thomaz: what cpu do you have? does it support aes-ni hardware acceleration? what java version do you use with JDownloader, check about dialog? maybe you can switch to newer version and benefit from performance optimization in aes gcm cipher that has performance hog bug in older java version.
__________________
JD-Dev & Server-Admin |
#2870
|
||||
|
||||
@thomaz
Regarding enforcing http/https: Rapidgator.net: No idea 1fichier.com: They additionally have a dedicated setting for this on their website, see 1fichier.com/console/params.pl -> Force the downloads without SSL
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2871
|
|||
|
|||
What is the latest jre?
java.com says: jre-8u401-windows-x64.exe oracle.com says: java from 17 to 23. cpu is core i3-6100 and i7-6700 Any way to extract jre without installing it? Tried uniextract... no go Tried sandboxie... also no :( Last edited by thomaz; 13.04.2024 at 23:28. |
#2872
|
||||
|
||||
@thomaz: get jdk/jre from here adoptium.net/de/temurin/releases/?os=windows&arch=x64&package=jre
and then replace the jre/java (don't know right now which one it is) folder within your JDownloader directory. Launcher will first check this folder and then lookup jre in your OS. Java8,11,17,21 are LTS, will get long term support/updates, but in the end, doesn't really matter. you can still use Java8 or check out Java 21.
__________________
JD-Dev & Server-Admin |
#2873
|
|||
|
|||
after updating sandboxie i was able to get the jre folder from 8u401-windows-x64.exe.
and ... cpu usage went from ~15% old jre to 1-3% (i3-6100) new jre. thats very nice. thx Last edited by thomaz; 14.04.2024 at 00:01. |
#2874
|
||||
|
||||
Thanks for the feedback. There had been very long time performance bug in aes gcm cipher in java that was causing high cpu usage.
__________________
JD-Dev & Server-Admin |
#2875
|
|||
|
|||
Hello i would like to make an event script which move (i dont want to download directly in those folders because i use ssd's for caching downloads) folders when package is finished with that specs:
if package contain *s??e??* move to /mnt/TV if package contain *2160* or *4K* move to /mnt/4K if package contain *1080* move to /mnt/HD I try to make it with a script.sh but the event scripter dont find the script even if i copy the script in /config with docker cp command. here is the event script for test Code:
var move4k = '/config/scripts/move4k.sh' callSync(move4k); Code:
#!/bin/bash mv /home/user/jdownloader/Downloads/*2160* /mnt/4K/
Spoiler:
net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: Line 3
java.io.IOException: Cannot run program "/config/scripts/move4k.sh": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:87) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:70) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:65) at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment .java:286) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:153) at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1536) at script(:3) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitP ermissionRestricter.java:134) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3286) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1361) at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:344) at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:192) at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:172) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 21 more (#3) at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:2053) at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:179) at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1536) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitP ermissionRestricter.java:134) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3286) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1361) at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:344) at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:192) at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:172) Caused by: org.jdownloader.extensions.eventscripter.EnvironmentException: Line 3 java.io.IOException: Cannot run program "/config/scripts/move4k.sh": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:87) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:70) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:65) at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment .java:286) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:153) at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1536) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitP ermissionRestricter.java:134) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3286) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1361) at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:344) at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:192) at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:172) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 21 more at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment .java:289) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:153) ... 12 more Caused by: java.io.IOException: Cannot run program "/config/scripts/move4k.sh": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:87) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:70) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:65) at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment .java:286) ... 17 more Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 21 more I run jdownloader in a docker on ubuntu 22.04 and use jlesage image Thanks for the help Last edited by wizhack; 14.04.2024 at 13:43. |
#2876
|
||||
|
||||
@wizhack: script is executable? chmod +x
and the folders in the script are reachable/correct in docker? The error happens when a.) file doesn't exist b.) file is not executable
__________________
JD-Dev & Server-Admin |
#2877
|
||||
|
||||
Quote:
This is the full script for converting all YouTube audio files (aac,m4a,ogg,opus) to MP3 320 Kbps bitrate.With the Trigger in Event Scripter activated "A Download stopped", and automatically delete all original files: Code:
/* Convert aac/m4a/ogg/opus files to 320 kbps mp3. Trigger required: "A Download Stopped". */ if (link.finished) { var input = link.downloadPath; var output = link.downloadPath.replace(/(.+\.)(aac|m4a|ogg|opus)$/i, "$1mp3"); if (input != output) { var interfaceName = "org.jdownloader.controlling.ffmpeg.FFmpegSetup"; var ffmpeg = callAPI("config", "get", interfaceName, null, "binarypath"); callSync(ffmpeg, "-n", "-i", input, "-b:a", "320k", output); getPath(output).size && getPath(input).delete(); } } Last edited by dataDyne; 07.07.2024 at 05:29. |
#2878
|
|||
|
|||
Quote:
Code:
docker exec jdownloader-2 ls -l /config/scripts/ -rwxrwxr-x 1 app app 60 Apr 14 12:16 move4k.sh How can i do with the builtin event scripter (without script shell) ? Last edited by wizhack; 14.04.2024 at 15:33. |
#2879
|
||||
|
||||
@wizhack: it would make much more sense in finding out why it doesn't work with your read2use script than reinventing the wheel. yes , it would be possible with eventscripter but you will have to wait for others to help you with this. about your script, check the following:
a.) can you execute the script in docker manually? b.) is the script maybe on a mountpoint with NOEXEC option? c.) what is the permission of folder /config
__________________
JD-Dev & Server-Admin |
#2880
|
|||
|
|||
Sooooooo i have got some news !!!! the file not found was for bash which was not found !!!
So on jlesage jdownloader (alpine based image) with docker you have to do : 1st you have to go in container shell : Code:
docker exec -ti CONTAINER-NAME sh Code:
# apk update && add bash now i have some rights issues for moving folder to a nfs share which is mount in /mnt/4K. Last edited by wizhack; 14.04.2024 at 22:50. |
Thread Tools | |
Display Modes | |
|
|