JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1001  
Old 28.10.2019, 23:56
Lessen Lessen is offline
Modem User
 
Join Date: Oct 2019
Posts: 2
Default

Hey mgpai,

Is it possible to write a script that automatically downloads new photos from an instagram profile as soon as they are posted?
Reply With Quote
  #1002  
Old 29.10.2019, 14:41
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 627
Default

Quote:
Originally Posted by Lessen View Post
Is it possible to write a script that automatically downloads new photos from an instagram profile as soon as they are posted?
IG does not provide RSS feeds. You will have to use third-party services to generate custom RSS/XML feeds and add them at regular intervals to linkgrabber using a script.

Alternatively, you can also use a script to add native IG urls to the linkgrabber at regular intervals. By default this will fetch all the content from the given url. There is a plugin option where you can specify the 'x' latest items to be fetched. This however does not seem to be currently working as expected.

If you want to avoid adding duplicate urls to linkgrabber, you will have to leave the old urls in the download list or linkgrabber list. If the links are present in linkgrabber, JD will skip them. Links present in the download list will be added to the list and marked (BG color will be red) as duplicate. You can create a linkgrabber filter rule to also skip links which are present in the download list.

Code:
// Add urls to linkgrabber at user-defined intervals
// Trigger: Interval (Recommended 3600000 ms or more)

var urls = [];
urls[urls.length] = "**External links are only visible to Support Staff**;
urls[urls.length] = "**External links are only visible to Support Staff**;
urls[urls.length] = "**External links are only visible to Support Staff**;
urls[urls.length] = "**External links are only visible to Support Staff**;
urls[urls.length] = "**External links are only visible to Support Staff**;

callAPI("linkgrabberv2", "addLinks", {
    "links": urls.join(" ")
});
Reply With Quote
  #1003  
Old 06.11.2019, 03:24
Edwardo270 Edwardo270 is offline
Modem User
 
Join Date: Nov 2019
Posts: 2
Default

Hi mgpai, I love your work!

I've been fiddling around with the event scripter but can't figure this out:

I am hoping to write a script that takes all my pending downloads/links in my downloads tab and organises them into packages by hoster/domain (rapidgator, keep2share, depositfiles, etc). For instance if I had 5 downloads for rapidgator and 6 for depositfiles then ran the script, I would have 2 packages ("rapidgator" and "depositfiles") each containing the 5 and 6 downloads, repectively.


Are you able to assist? Thanks in advance.
Reply With Quote
  #1004  
Old 06.11.2019, 13:48
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 627
Default

Quote:
Originally Posted by Edwardo270 View Post
... script that takes all my pending downloads/links in my downloads tab and organises them into packages by hoster/domain ...
Code:
// From selected links, move only the pending download links to packages by Host
// Trigger: Downloadlist Contextmenu Button Pressed
// Customize Downloadlist Context menu > Add new "Eventscripter Trigger" button > Rename it to "Move to Packages by Host" > Change Icon (Optional)

if (name == "Move to Packages by Host") {
    var links = [];
    var downloadPath = null; // <- Set download folder (if not specified, default folder will be used)

    dlSelection.getLinks().forEach(function(link) {
        if (!link.getBytesLoaded() && !link.isRunning()) {
            var host = link.getDownloadHost().replace(/(.+)\..+/, "$1");
            if (!links[host]) links[host] = [];
            links[host].push(link.getUUID());
        }
    })

    for (x in links) callAPI("downloadsV2", "movetoNewPackage", links[x], null, x, downloadPath);
}
Reply With Quote
  #1005  
Old 07.11.2019, 02:36
Edwardo270 Edwardo270 is offline
Modem User
 
Join Date: Nov 2019
Posts: 2
Default

Thank you!! It works great!

Edit:
oops!
@mgpai: Thank you!

Last edited by Edwardo270; 08.11.2019 at 04:34.
Reply With Quote
  #1006  
Old 07.11.2019, 11:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 66,134
Default

@mgpai: THANKS!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1007  
Old 15.11.2019, 14:07
sergrlager sergrlager is offline
I will play nice!
 
Join Date: Nov 2019
Posts: 1
Default Script for event

i need help with some scripting for this;
first script for event scripter :
i need script for request of reconnect after one download is finished - i use step by step link download

and what trigger must i use for this script ?

Thanks!
Reply With Quote
  #1008  
Old 15.11.2019, 17:28
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 627
Default

Quote:
Originally Posted by sergrlager View Post
i need script for request of reconnect after one download is finished ... and what trigger must i use for this script ?
You can use "A Download Stopped" trigger" and check if the download is finished before performing a reconnect.

JD can automatically reconnect when required. Any particular reason you want to use a script for this?
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 18:12.
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 - 2019, Jelsoft Enterprises Ltd.