#2641
|
|||
|
|||
![]()
Hey folks,
is there a way to execute one of the other scripts from within a script? Background: I have a script running on interval that I would also like to run when I start the download controller. However, I don't want to copy-past the script and do every change to it twice. ![]() I don't really care whether it's via the file system or via internal reference. Example code would be appreciated. Thanks in advance! |
#2642
|
|||
|
|||
![]() Quote:
![]() |
#2643
|
|||
|
|||
![]()
hallo and really sorry
i'm really new on scripting but this is the only solution to solve my problem.. i need a script to crawl link at file (ie k2s or rapidagtor or others) from a forum thread (100+ pages) the site si something like this (don't need login for read) **External links are only visible to Support Staff****External links are only visible to Support Staff** i looking around on the forum but don't find what i need , normal copy/paste limit the research only on fst page... can please you help me? ty vm Last edited by lollos; 29.06.2023 at 13:40. |
#2644
|
||||
|
||||
![]()
@lollos
A script is not really needed in this case as that website is a super simple website. You should be able to make this work with 1-2 LinkCrawler rules. If you fail to do so, you can still use this method.
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#2645
|
|||
|
|||
![]() Quote:
![]() |
#2646
|
|||
|
|||
![]()
Having received HTML in a script, is it possible to use it to create a DOM object on which methods such as querySelector() can be used?
If it's not possible natively (it doesn't seem to be, according to my attempts, code below), is there a technique to import the capability? Code:
var doc = fromHTML(<HTML_Page>); var cap = doc.querySelector(".post__content").innerText; alert(cap); function fromHTML(sourceText) { var doc = document.implementation.createHTMLDocument('TEST'); doc.open(); doc.write(sourceText); // sourceText is a fully formed entire page. doc.close(); return doc; } |
#2647
|
|||
|
|||
![]()
**External links are only visible to Support Staff****External links are only visible to Support Staff**
|
#2648
|
|||
|
|||
![]()
Hi guys! ��
Look for the video in which I explain this on my YouTube channel: Notefijes **External links are only visible to Support Staff****External links are only visible to Support Staff** I bring you a video tutorial in which I explain how to convert the audio of your downloads directly to .MP3 format. ✨ from JDownloader. Sometimes we download videos and we just want to listen to the music, right? Well, with this tutorial you are going to become a crack in the subject and you will learn to do it in an easy way. In the video I show you a perfect tool to extract the audio from any video you download with JDownloader and save it in .MP3, so forget about looking for other converters online. Everything you need is one click away. Don't worry if you're new to this, because the tutorial is intended for everyone, from the novice to the most experienced in the field. I explain everything step by step, very clearly, and I show you all the necessary options in JDownloader so that you become an expert in audio conversion. If you have any questions, comments or anything you want to share, leave me your comments below the video. I will be waiting to answer you and give you a hand in whatever you need. ❓ Do not miss this tutorial, it will save you on more than one occasion and you will get the most out of your downloads with JDownloader! Last edited by Notefijes; 09.07.2023 at 15:54. |
#2649
|
|||
|
|||
![]()
how do i do an if statement based on the downloaded file's size? i'm thinking using du somehow but i'm so unfamiliar with event scripter i thought i'd ask here.
i've been using Quote:
Quote:
(i'm working with old hardware here and the web playback is choppy, so i got used to this silly way of doing it, instead of playing in the browser, to the point i actually prefer it now) |
#2650
|
||||
|
||||
![]()
Please provide example URLs for that case.
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#2651
|
|||
|
|||
![]()
Hi, I am trying to remove files that contain yesterday's date in the title when crawling them.
This is the basic idea of the code, but it's just a guess. I am not a programmer. Can you help me? Code:
const d = new Date(); const aa = d.getDate()-1; if (crawledlink.includes(aa)) link.remove(); |
#2652
|
||||
|
||||
![]()
Hi, I'm pretty sure this has been asked already and I tried searching the thread but having a hard time finding it.
How can I make it so JD2 adds/crawls a specific link at a certain time/interval, then automatically downloading it, and ignoring files that are already in the download list? Like for example, this would be the link I want to download from: **External links are only visible to Support Staff**... PW:
Spoiler:
bnb0PVF7zef
At random times during the next few days, new files will be added to that folder so I can't really set a specific time so I guess interval would be better. Thank you. |
#2653
|
||||
|
||||
![]()
@DukeM
You can create a .crawljob and then use an EventScripter script to repeatedly add that again to JD - when more code in that script to eliminate all items which are already in downloadlist. I'm also pretty sure that someone already posted a script for this but unfortunately I also won't be able to help with it. Reference regarding Folder Watch addon / crawljob: https://support.jdownloader.org/Know...3/folder-watch
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#2654
|
||||
|
||||
![]()
Ooh, haven't tried using FolderWatch yet. Thank you! It was pretty obvious in the description but somehow didn't see that. Lol.
Last edited by DukeM; 21.07.2023 at 10:18. |
#2655
|
||||
|
||||
![]()
Just keep in mind that Folder Watch alone will not do what you want - it will process each job only once hence you need more external scripts to accomplish what you want.
Also for adding only "new" items from linkgrabber to downloadlist you'd need a script. ...though I guess if you setup JD to auto move added items from linkgrabber to downloadlist and configure JD to auto delete dupes when moving items to downloadlist, your script wouldn't need to do a lot other than re-adding the link or crawljob every X time. Settings: Auto add items added to linkgrabber to downloadlist: Code:
LinkgrabberSettings.linkgrabberautoconfirmenabled Auto delete duplicates when moving items from linkgrabber to downloadlist: Code:
LinkgrabberSettings.handledupesonconfirmlatestselection Those settings are also available in GUI but for me it was easier to look them up in advanced settings atm.
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#2656
|
||||
|
||||
![]()
Yeah, seems like it isn't as straightforward as I thought. Thanks for the guides though! Will try to figure them all out.
![]() |
#2657
|
|||
|
|||
![]()
can anyone help?
Thanks Quote:
|
#2658
|
|||
|
|||
![]()
// SIMPLE DOWNLOAD HISTORY 2.0
// Trigger required: A Download Stopped // Version 2023.07.24 by Maxx10. if (link.isFinished()) { var uuid = package.getUUID(); var pkge = package.getName(); var dateNowUTC = new Date().toISOString(); var dateNow = new Date(dateNowUTC); dateNow.setUTCHours(dateNow.getUTCHours() - 3); var dateNow = dateNow.toISOString().slice(0, 10); var timeNowUTC = new Date().toISOString(); var timeNow = new Date(timeNowUTC); timeNow.setUTCHours(timeNow.getUTCHours() - 3); var timeNow = timeNow.getUTCHours(); // Get the download added date, date and time. var addedDateUTC = new Date(package.getAddedDate()).toISOString(); var addedDate = new Date(addedDateUTC); addedDate.setUTCHours(addedDate.getUTCHours() - 3); addedDate = addedDate.toISOString(); addedDateGMT = addedDate.slice(0, 10) + " " + addedDate.slice(11, 19) + " GMT-0300 (BRT)"; // Get the finished download, date and time. var endDownloadDateUTC = new Date(link.getFinishedDate()).toISOString(); var endDownloadDate = new Date(endDownloadDateUTC); endDownloadDate.setUTCHours(endDownloadDate.getUTCHours() - 3); endDownloadDate = endDownloadDate.toISOString(); endDownloadDateGMT = endDownloadDate.slice(0, 10) + " " + endDownloadDate.slice(11, 19) + " GMT-0300 (BRT)"; var a /*history folder*/ = "E:\\software dump\\jd2info\\history\" + "\" + dateNow + "\" + timeNow + "h" + "\"; var b /*history file Name */ = uuid + " " + pkge + ".txt"; var c /*download file name*/ = link.getName(); if (!getPath(a).exists()) getPath(a).mkdirs(); writeFile(a + b, addedDateGMT + " | " + endDownloadDateGMT + " | " + c.split(',') + "\r\n", true); } |
#2659
|
|||
|
|||
![]()
Hola,
¿Como puedo hacer justo lo que indico aquí?: https://board.jdownloader.org/showth...290#post523290 Saludos |
#2660
|
|||
|
|||
![]()
¿Alguien puede ayudarme?
|
![]() |
Thread Tools | |
Display Modes | |
|
|