JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #41  
Old 29.06.2022, 21: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, 09:07
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 76,876
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, 15: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, 17:43
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 76,876
Default

@flowlapache: thanks, will check mail and answer as soon as possible
__________________
JD-Dev & Server-Admin
Reply With Quote
  #45  
Old 13.07.2022, 13:21
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 62,589
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
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?
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

Last edited by Jiaz; 18.07.2022 at 18:26.
Reply With Quote
  #46  
Old 15.07.2022, 15: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, 18:27
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 76,876
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, 18: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, 18:52
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 76,876
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 06:00.
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 - 2022, Jelsoft Enterprises Ltd.