JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > Deutscher Support > Wünsche
Reply
 
Thread Tools Display Modes
  #1  
Old 18.07.2022, 10:44
BoeseBZ's Avatar
BoeseBZ BoeseBZ is offline
Black Hole
 
Join Date: Mar 2009
Posts: 257
Default Envato.com Elements Freebees

Grüße,

ich würde mir wünschen die Envato Freebess einfach laden zu können, ggf. dann auf einmal, sofern machbar.

Ein Account ist voraussetzung, zum testen kann ich dieses zur Verfügung stellen.

Übersicht:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

Einzelansicht:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

Mit Klick auf Download öffnet sich ein Popup + Checkbox zum bestätigen

Möglicher Downloadlink:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

LG
Reply With Quote
  #2  
Old 18.07.2022, 11:05
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

@BoeseBZ: Download Button wohl erst nach Login möglich? Könntest Logins an support@jdownloader.org schicken
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 18.07.2022, 11:15
BoeseBZ's Avatar
BoeseBZ BoeseBZ is offline
Black Hole
 
Join Date: Mar 2009
Posts: 257
Default

Soeben raus

Danke !

LG
Reply With Quote
  #4  
Old 18.07.2022, 12:39
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

@BoeseBZ: Habe dir per Mail geantwortet
Über Linkcrawler Regeln geht das nicht, da der Ablauf mehr Requests/Posts benötigt. Ich würde ein Skript für den Eventskripter, ähnlich zu https://board.jdownloader.org/showthread.php?t=71137 vorschlagen welches die ID aus der URL liest und dann die nötigen Requests durchführt und die finale DownloadURL dann an den JDownloader weitergibt.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 18.07.2022, 14:29
BoeseBZ's Avatar
BoeseBZ BoeseBZ is offline
Black Hole
 
Join Date: Mar 2009
Posts: 257
Default

Ui.... ich bekomme das nicht umgesetzt
Reply With Quote
  #6  
Old 18.07.2022, 17:22
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

Hier ein funktionierendes Skript. TriggerTyp beim Eventscripter ist "New Crawler Job". Das Skript reagiert nur auf einen einzelnen Link!
Du musst noch das Cookie _elements_session_4 selbst aus dem Browser ins Skript übertragen.
Code:
var sourceURL = job.text;
var matchURL = (/^https?:\/\/elements\.envato\.com\/.+\/[^\/]+-([^\/-]+)$/).test(sourceURL);

try {
    if (matchURL) {
        var br = getBrowser();
        br.setCookie("elements.envato.com", "_elements_session_4", "FILL_ME_WITH_COOKIE_VALUE");
        var page = br.getPage(sourceURL);
        var token = page.match(/window.CSRF_TOKEN=\"(.*?)\"/);
        if (token) {
            var id = sourceURL.match(/-([^\/-]+)$/);
            //alert(id+" "+sourceURL);
            br.setHeader("x-csrf-token", token[1]);
            br.setHeader("Origin", "**External links are only visible to Support Staff**);
            var result = br.postPage("**External links are only visible to Support Staff**+id[1]+"/license.json", "{\"itemId\":\""+id[1]+"\",\"licenseType\":\"free\"}");            
            if (br.getResponseCode() == 200 && result.indexOf("\"free\"")>0) {                
                var downloads = br.postPage("**External links are only visible to Support Staff** + id[1] + "/download.json", "{\"licenseType\":\"free\"}");
                if (br.getResponseCode() == 200 ) {
                    var response = JSON.parse(downloads);
                    var downloadUrl = response["data"]["attributes"]["downloadUrl"];
                    var directUrl = "direct**External links are only visible to Support Staff** + downloadUrl;
                    callAPI("linkgrabberv2", "addLinks", {
                        "links": directUrl
                    });
                }
                //alert(response.get("data"));
            }
        }
    }
} catch (e) {
    alert(e);
}
pastebin.com/dQr5REz6
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply


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 07:04.
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.