JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1381  
Old 19.05.2020, 23:40
zreenmkr zreenmkr is offline
JD Addict
 
Join Date: Feb 2020
Posts: 169
Default

Quote:
Originally Posted by MrBojangles_ View Post
gpai's method seems to indicate I can save variables that I can retrieve in later instances...
i didn't know that, i'm new to object and method in general
Reply With Quote
  #1382  
Old 20.05.2020, 07:55
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,108
Default

@MrBojangles_
adding links to JD interface
will result in linkchecking via website or api

account based downloads
downloading method for web includes linkchecking part of the download step or not. If websites have direct download option we typically do not do this logged in as it will send data over html. If they always return html we use logged in as its one less request (faster). If its api based two calls, one to check online status, second to start download.

free downloads
will online check as part of the download routine.

which site penalises you ? Maybe best approach is for us to add plugin specific code to just always return links online. Filename/size/onlinestatus will only be available on download

adding work around like this is kinda pointless. right? Have you thought about turning linkchecking off (advanced setting)?
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 20.05.2020 at 09:34.
Reply With Quote
  #1383  
Old 20.05.2020, 11:15
MrBojangles_ MrBojangles_ is offline
Baby Loader
 
Join Date: May 2020
Posts: 9
Default

Quote:
i didn't know that, i'm new to object and method in general
You're one step ahead of me; I haven't got a clue about any of this stuff! Appreciate the help though.

Quote:
which site penalises you ? Maybe best approach is for us to add plugin specific code to just always return links online. Filename/size/onlinestatus will only be available on download

adding work around like this is kinda pointless. right? Have you thought about turning linkchecking off (advanced setting)?
The site is **External links are only visible to Support Staff**www.soundsnap.com You can download about 75 things before you get hit with a captcha. Linkchecking gets counted in that. Fortunately pspzockerscene very kindly made a crawler rule for me, and I turned link checking off.

If you felt like making a plugin that handled this that would be amazing (I have 300k files to download!) - because my very hacky solution to getting round the recaptcha with mouse macros works until it starts asking you to match pictures instead of just ticking a box. In my testing I've found that you can complete the captcha on a completely different computer and it'll still reset the download limit - so I'm guessing that it would be possible to automate everything and send the captchas to a farm via a plugin. I'd love to make this myself but I think it's beyond my capabilities
Reply With Quote
  #1384  
Old 20.05.2020, 12:15
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 53,066
Default

@MrBojangles_
What you want would still require a plugin - everything else is just a workaround/hack.
Also keep in mind that there will NEVER be any "general" solution for scenarios like yours - a script always needs to recognize the moment in which that captcha starts to appear and needs to know what to do then.
... not saying it is impossible via LinkCrawler rules though as I did send you here.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || Erste Schritte & Tutorials
JDownloader 2 Setup Download
-----=>Support Chat<=-----
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #1385  
Old 20.05.2020, 12:25
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,108
Default

if your using crawler rules, probably also means you're downloading wiht directhttp plugin which means no in plugin support for captcha for that service. so yes what psp said is that you do need dedicated hoster plugin which could at least provide you with means to answer respective captcha.

alternatively if its all based on IP session, one could reset ip address to avoid said limits. At least on the download side you implied its only requirement once limit is met, resetting ip (if you have dynamic) would be a better solution than answering 1 captcha per download thereon after.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 20.05.2020 at 12:29.
Reply With Quote
  #1386  
Old 20.05.2020, 12:29
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 53,066
Default

@raztoki
I did help him to make that Link Crawler rule and it will work fine, especially in combination with deactivating the linkcheck but once he runs in this limit, all following URLs will get displayed as offline.
He then has to solve the captcha after which everything will continue to work with the existing session cookies.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || Erste Schritte & Tutorials
JDownloader 2 Setup Download
-----=>Support Chat<=-----
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #1387  
Old 20.05.2020, 13:04
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,108
Default

arh so its cookie based. so ip resetting most likely wont be a workable solution then
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #1388  
Old 20.05.2020, 13:08
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 53,066
Default

I haven't tried it but don't think it would though I have seen providers which would e.g. reset account limits on reconnect (keep2share) but it's rare.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || Erste Schritte & Tutorials
JDownloader 2 Setup Download
-----=>Support Chat<=-----
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #1389  
Old 20.05.2020, 14:57
MrBojangles_ MrBojangles_ is offline
Baby Loader
 
Join Date: May 2020
Posts: 9
Default

@raztoki
Sorry I haven't really been clear about how their site works:
You get around 75 downloads (varies) between captcha requests
The captchas start as just clicks (hence mouse macro), but then turn into the picture ones after (presumably) too many captcha requests have been done in a set amount of time.

Something I haven't mentioned which actually seems quite relevant is that the captcha page is generic: (**External links are only visible to Support Staff****External links are only visible to Support Staff**)
and resets the download limit even if you browse to it directly without being redirected there (which is why my mouse macro works because it just browses to that page and clicks the box automatically).

Presumably then a plugin could pass that link plus the embedded session cookie out to a captcha farm automatically whenever a download fails? It feels like that would be more straightforward than most plugins, but obviously I speak from a position of complete ignorance. Is there a similar plugin already in JD that I could study?
Reply With Quote
  #1390  
Old 20.05.2020, 16:17
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 53,066
Default

Quote:
Originally Posted by MrBojangles_ View Post
Presumably then a plugin could pass that link plus the embedded session cookie out to a captcha farm automatically whenever a download fails? It feels like that would be more straightforward than most plugins, but obviously I speak from a position of complete ignorance.
Basically, yes.

Quote:
Originally Posted by MrBojangles_ View Post
Is there a similar plugin already in JD that I could study?
Sure - I'm unable to remember a "clean" written one atm but there are good examples.

You're especially looking for some containing reCaptchaV2 solver code aka "CaptchaHelperHostPluginRecaptchaV2" nd also ones that support account login --> text "enablePremium".

-psp-"
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || Erste Schritte & Tutorials
JDownloader 2 Setup Download
-----=>Support Chat<=-----
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #1391  
Old 05.06.2020, 17:47
BillyCool BillyCool is offline
Junior Loader
 
Join Date: Sep 2016
Location: Australia
Posts: 11
Default

There's a number newer Javascript features that don't seem to be supported in the event scripter, things like default parameter values or arrow expressions.

I suspect is due to using HtmlUnit 2.15, which was released 6 years ago. Is it possible to update HtmlUnit to a newer version to support modern Javascript features?
Reply With Quote
  #1392  
Old 05.06.2020, 19:50
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 67,320
Default

@BillyCool: Has nothing to do with HtmlUnit but with used JS Engine Rhino and limited JS feature set and old JS support version. It was never goal to fully support JS nor modern language features because lack of JS engine support.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1393  
Old 05.06.2020, 20:22
BillyCool BillyCool is offline
Junior Loader
 
Join Date: Sep 2016
Location: Australia
Posts: 11
Default

Quote:
Originally Posted by Jiaz View Post
@BillyCool: Has nothing to do with HtmlUnit but with used JS Engine Rhino and limited JS feature set and old JS support version. It was never goal to fully support JS nor modern language features because lack of JS engine support.
I see, is there any way to maybe import modern JS features using require(), maybe JQuery potentially? I remember trying in the past with no luck. Has anyone attempted and succeeded?
Reply With Quote
  #1394  
Old 06.06.2020, 04:20
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,108
Default

Not sure they will make support possible as it would require more modern Java and then moves JD away from older Java support. Currently JD supports 1.6 =< *

using 3rd party libraries could be a solution though, see what Jiaz says on his return =]
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #1395  
Old 07.06.2020, 10:22
sherbee sherbee is offline
Mega Loader
 
Join Date: Mar 2019
Posts: 62
Default

Quote:
Originally Posted by mgpai View Post
Here is a new script, but if you need help to troubleshoot/fix yours, contact me in JD Chat.

Code:
// Move archive files after extraction
// Trigger: Archive Extraction Finished

var links = archive.getDownloadLinks() || [];
var destinationFolder = "C:/sherbee/check";

links.forEach(function(link) {
    var filePath = getPath(link.getDownloadPath());
    var i = 0;

    while (getPath(destinationFolder + "/" + filePath.getName()).exists()) {
        i++;
        newPath = getPath(link.getDownloadPath().toString().replace(/(.+)(\..+)/, "$1" + i + "$2"));
        getPath(filePath).renameTo(newPath);
        filePath = newPath;
    }

    filePath.moveTo(destinationFolder);
});
The script is very good. But problem now:

When menu-tools-extract files then archive.getDownloadLinks() not there.
How get path(s) from manual open?
I need path for case single file (abc.rar or abc.zip etc) but too for multi file like (abc.001, abc.002) so move can work for manual open too.
Reply With Quote
  #1396  
Old 07.06.2020, 11:24
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 896
Default

Quote:
Originally Posted by sherbee View Post
... When menu-tools-extract files then archive.getDownloadLinks() not there. How get path(s) from manual open? ...
Loop through extracted file paths (array):

Code:
var myFilePath[] = myArchive.getExtractedFilePaths();
Reply With Quote
  #1397  
Old 08.06.2020, 06:47
sherbee sherbee is offline
Mega Loader
 
Join Date: Mar 2019
Posts: 62
Default

Quote:
Originally Posted by mgpai View Post
Loop through extracted file paths (array):

Code:
var myFilePath[] = myArchive.getExtractedFilePaths();
Thank! Will try soon! Hope it works.
Reply With Quote
  #1398  
Old 08.06.2020, 19:28
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 67,320
Default

@BillyCool
I'm afraid that's not possible because the JS engine itself must support the language elements/features.
Optional github.com/graalvm/graaljs might be possible
I see that modern language features are a nice to have but I think that the the purpose to create simple scripts can also be achieved with current language feature set

@mgpai: I think best would be to add generic support for all internal archive file type
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1399  
Old 10.06.2020, 16:49
Fragmata Fragmata is offline
Modem User
 
Join Date: Jan 2020
Posts: 2
Default

Hello, I know something similar has already been asked several times, but no where can I find a solution that works to my liking.

I would like a script for a custom button, that when pressed, will check my Files and Folders if they exist, then compare them with the Files in my Linkgrabber and then either mark them as already existing or move them to a different package or simply delete them from the Linkgrabber list.
I do not want it to only disable the Links when attempting to Download, because when I switch to an empty Hard Drive later on, it will no longer be able to check if the Files already exist.
Reply With Quote
  #1400  
Old 10.06.2020, 16:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 67,320
Default

@Fragmata: such a script rings my bell but I couldn't find it right now. Maybe other community users can find it or similiar one or can help with creation of such a script.
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 20:24.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.