JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #41  
Old 29.06.2022, 22:06
flowlapache flowlapache is offline
DSL Light User
 
Join Date: Oct 2016
Posts: 31
Default

yes of course!
**External links are only visible to Support Staff**...

I tried this with my username and password:
Code:
//Ajoutez votre script ici. N'hésitez pas à utiliser les propriétés et méthodes de l'API disponibles.
// Crawler: psyreactor.com
// Trigger required: "New Crawler Job"

var sourceURL = job.text;
var matchURL = (/^https:\/\/psyreactor.com\/.+\/[\d-]+$/).test(sourceURL);

try {
    if (matchURL) {
        var mainURL = "**External links are only visible to Support Staff**;
        var username = "***"; // Change username
        var password = "***"; // Change password

        var br = getBrowser();
        var postURL = mainURL + "index/sub/";
        var postData = "user=" + username + "&password=" + password + "&rem=1&a=2&ajax=1&rnd=691";
        var mainPage = br.getPage(mainURL);
        var mainPage = br.postPage(postURL, postData);
        var links = br.getPage(sourceURL);

        callAPI("linkgrabberv2", "addLinks", {
            "links": links
        });

        job.setText("");
    }
} catch (e) {
    alert("Error occured while adding \"" + sourceURL + "\". Please try again");
}
Reply With Quote
  #42  
Old 30.06.2022, 10:07
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

@flowlapache: URL pattern (matchURL) is different and the whole login logic is also different.
Can you send logins and example links to support@jdownloader.org
The script doesn't work 1:1 without modifications because its a complete different site
__________________
JD-Dev & Server-Admin
Reply With Quote
  #43  
Old 06.07.2022, 16:24
flowlapache flowlapache is offline
DSL Light User
 
Join Date: Oct 2016
Posts: 31
Default

ok, naively, I believed it was same logic...
thank you, since so much years you help peoples!!
I send logins and examples now by email.
Reply With Quote
  #44  
Old 06.07.2022, 18:43
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

@flowlapache: thanks, will check mail and answer as soon as possible
__________________
JD-Dev & Server-Admin
Reply With Quote
  #45  
Old 13.07.2022, 14:21
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

@flowlapache
Completely without testing, I'd say it could work like this:

Code:
//Ajoutez votre script ici. N'hésitez pas à utiliser les propriétés et méthodes de l'API disponibles.
// Crawler: psyreactor.com
// Trigger required: "New Crawler Job"

var sourceURL = job.text;
var matchURL = (/^https:\/\/(?:www\.)?psyreactor\.com\/viewtopic\.php\?p=[0-9]+/).test(sourceURL);

try {
    if (matchURL) {
        var mainURL = "**External links are only visible to Support Staff**;
        var username = "TODO"; // Change username
        var password = "TODO"; // Change password

        var br = getBrowser();
        var postURL = mainURL + "login.php";
        var postData = "username=" + username + "&password=" + password + "&redirect=&login=Log+in";
        var mainPage = br.getPage(mainURL);
        var mainPage = br.postPage(postURL, postData);
        var links = br.getPage(sourceURL);

        callAPI("linkgrabberv2", "addLinks", {
            "links": links
        });

        job.setText("");
    }
} catch (e) {
    alert("Error occured while adding \"" + sourceURL + "\". Please try again");
}
pastebin.com/y3Q521xe

Update by jiaz: fixed/tested just replace username/password with correct ones
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?

Last edited by Jiaz; 18.07.2022 at 19:26.
Reply With Quote
  #46  
Old 15.07.2022, 16:33
flowlapache flowlapache is offline
DSL Light User
 
Join Date: Oct 2016
Posts: 31
Default

Thank you @pspzockerscene for the try. I tried it but it doesn't work.
I understand with difficulties how regexp works, for the line "var matchURL", it says there is no limit.
I tried to replace [0-9]+
by
[\d-]+$/

but it doesn't work too.
Reply With Quote
  #47  
Old 18.07.2022, 19:27
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

@flowlapache: I've fixed script here https://board.jdownloader.org/showpo...7&postcount=45
__________________
JD-Dev & Server-Admin
Reply With Quote
  #48  
Old 18.07.2022, 19:45
flowlapache flowlapache is offline
DSL Light User
 
Join Date: Oct 2016
Posts: 31
Default

@Jiaz: Thank you a lot!!
It works like a charm!! Thanks again
Reply With Quote
  #49  
Old 18.07.2022, 19:52
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

@flowlapache: Thanks for the feedback and you're welcome!
__________________
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 11:53.
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 - 2024, Jelsoft Enterprises Ltd.