JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #61  
Old 28.03.2017, 13:45
verheiratet1952 verheiratet1952 is offline
Bandwidth Beast
 
Join Date: Jan 2016
Posts: 148
Default

Quote:
Originally Posted by Jiaz View Post
Hard to tell without having access to such a csv file.
JDownloader does dupe checks. So adding the same url will result in only 1 link in list.

well, I was removing duplicates with Excel from csv file list...

how to be sure that file coding is correct? it also has special characters from German, Spanish, Turkish, ... language...
Reply With Quote
  #62  
Old 28.03.2017, 14:13
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

Use UTF-8 for Encoding!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #63  
Old 29.03.2017, 22:22
verheiratet1952 verheiratet1952 is offline
Bandwidth Beast
 
Join Date: Jan 2016
Posts: 148
Default

Quote:
Originally Posted by Jiaz View Post
Use UTF-8 for Encoding!
how to save all offline links/files at linkcrawler as a simple txt file?
(I can save as DLC, but that does have encryption)

I need offline links/files (that are not really offline) to process further...
Reply With Quote
  #64  
Old 30.03.2017, 08:56
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default


At the moment the best solution would be to use the zips from cfg folder. they contain the complete list. in future I will add support to export only selected ones
__________________
JD-Dev & Server-Admin
Reply With Quote
  #65  
Old 30.03.2017, 10:25
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 555
Default

Quote:
Originally Posted by verheiratet1952 View Post
how to save all offline links/files at linkcrawler as a simple txt file?
You can use this script.

Code:
// Save 'contentURLs' of selected links to text file.
// Trigger required: "Linkgrabber Contextmenu Button Pressed"
// Forum Topic: https://board.jdownloader.org/showthread.php?t=70907

var saveTo = "c:/myFolder"; // <- Specify an existing folder to to save the text file.

if (name == "Save URLs to text file") /* <-- Name of the button to be used in context menu (case-sensitive) */ {
    var links = lgSelection.getLinks();
    var urls = [];
    var date = new Date().toISOString().replace(/([^T]+).+/, "$1");
    var saveAs = "/" + date + ".txt";

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var url = link.getContentURL();
        if (url) urls.push(url);
    }
    if (urls.length) writeFile(getPath(saveTo + saveAs), urls.join("\r\n"), true);
}

Instructions:
  • Add script to event scripter
  • Go to Linkgrabber Tab > Context Menu > Open Menu Manager
  • Add Action > EventScripter Trigger
  • In the right-side panel change the name from "EventScripter Trigger" to the exact name of the button used in the script.
  • Save
Reply With Quote
  #66  
Old 07.04.2017, 18:33
verheiratet1952 verheiratet1952 is offline
Bandwidth Beast
 
Join Date: Jan 2016
Posts: 148
Default

Quote:
Originally Posted by Jiaz View Post

At the moment the best solution would be to use the zips from cfg folder. they contain the complete list. in future I will add support to export only selected ones
if I try to save a DLC from all offline files only there is some "container encryption failed" error !?
Attached Thumbnails
container-encryption-failed.JPG  
Reply With Quote
  #67  
Old 07.04.2017, 18:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

See here https://board.jdownloader.org/showthread.php?t=73231
__________________
JD-Dev & Server-Admin
Reply With Quote
  #68  
Old 12.04.2017, 12:25
verheiratet1952 verheiratet1952 is offline
Bandwidth Beast
 
Join Date: Jan 2016
Posts: 148
Default

script is starting and is asking me to allow or deny... I press allow... but then I get that error...

line 18 is exactly same like you did send

and I did create folder C:\myFolder on my local drive...








############################

net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: Line 18
java.io.IOException: Das System kann den angegebenen Pfad nicht finden
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(Unknown Source)
at org.appwork.utils.IO.writeStringToFile(IO.java:636)
at org.appwork.utils.IO.writeStringToFile(IO.java:625)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironmen t.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at script(:18)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitP ermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:232)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:126)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:106)
(#18)
at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1907)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:146)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitP ermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:232)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:126)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:106)
Caused by: org.jdownloader.extensions.eventscripter.EnvironmentException: Line 18
java.io.IOException: Das System kann den angegebenen Pfad nicht finden
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(Unknown Source)
at org.appwork.utils.IO.writeStringToFile(IO.java:636)
at org.appwork.utils.IO.writeStringToFile(IO.java:625)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironmen t.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitP ermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:232)
at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:126)
at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:106)

at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironmen t.java:962)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
... 12 more
Caused by: java.io.IOException: Das System kann den angegebenen Pfad nicht finden
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(Unknown Source)
at org.appwork.utils.IO.writeStringToFile(IO.java:636)
at org.appwork.utils.IO.writeStringToFile(IO.java:625)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironmen t.java:956)
... 17 more






Quote:
Originally Posted by mgpai View Post
You can use this script.

Code:
// Save 'contentURLs' of selected links to text file.
// Trigger required: "Linkgrabber Contextmenu Button Pressed"
// Forum Topic: https://board.jdownloader.org/showthread.php?t=70907

var saveTo = "c:/myFolder"; // <- Specify an existing folder to to save the text file.

if (name == "Save URLs to text file") /* <-- Name of the button to be used in context menu (case-sensitive) */ {
    var links = lgSelection.getLinks();
    var urls = [];
    var date = new Date().toISOString().replace(/([^T]+).+/, "$1");
    var saveAs = "/" + date + ".txt";

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var url = link.getContentURL();
        if (url) urls.push(url);
    }
    if (urls.length) writeFile(getPath(saveTo + saveAs), urls.join("\r\n"), true);
}

Instructions:
  • Add script to event scripter
  • Go to Linkgrabber Tab > Context Menu > Open Menu Manager
  • Add Action > EventScripter Trigger
  • In the right-side panel change the name from "EventScripter Trigger" to the exact name of the button used in the script.
  • Save
Attached Thumbnails
event-scripter-error.JPG   event-scripter.JPG  
Reply With Quote
  #69  
Old 12.04.2017, 12:57
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 555
Default

If you use backslash in path you need to escape it like this.

Code:
var saveTo = "c:\\myFolder"; // <- Specify an existing folder to to save the text file.
Reply With Quote
  #70  
Old 12.04.2017, 13:56
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

Thanks @mgpai for helping with this one
__________________
JD-Dev & Server-Admin
Reply With Quote
  #71  
Old 12.04.2017, 16:34
verheiratet1952 verheiratet1952 is offline
Bandwidth Beast
 
Join Date: Jan 2016
Posts: 148
Default

Quote:
Originally Posted by mgpai View Post
If you use backslash in path you need to escape it like this.

Code:
var saveTo = "c:\\myFolder"; // <- Specify an existing folder to to save the text file.


thanks a lot


how to add hour, minute and second to that line?

#######
var saveAs = "/" + date + ".txt";
#######
Reply With Quote
  #72  
Old 12.04.2017, 17:05
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

I suggest to contact/ask mgpai for help
__________________
JD-Dev & Server-Admin
Reply With Quote
  #73  
Old 12.04.2017, 17:44
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 555
Default

UTC Date/Time (Sample Format: 2017-04-13 04.43.59)
Code:
var date = new Date().toISOString().replace(/(.+)T(.+)\..+/, "$1 $2").replace(/:/g,".");

Local Date/Time (Sample Format: Apr 13 2017 08.15.36)
Code:
var date = new Date().toString().replace(/.{4}(.+) G.+/,"$1").replace(/:/g,".");

Last edited by mgpai; 13.04.2017 at 06:49. Reason: Optimized regex and added sample formats.
Reply With Quote
  #74  
Old 13.04.2017, 04:27
verheiratet1952 verheiratet1952 is offline
Bandwidth Beast
 
Join Date: Jan 2016
Posts: 148
Default

Quote:
Originally Posted by mgpai View Post
UTC Date/Time
Code:
var date = new Date().toISOString().replace(/([^.]+).+/, "$1").replace(/T/," ").replace(/:/g,".");

Local Date/Time
Code:
var date = new Date().toString().replace(/.{4}(.+) G.+/,"$1").replace(/:/g,".");
adding that line only or replacing old line completely?
Reply With Quote
  #75  
Old 13.04.2017, 05:25
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 555
Default

Replace old line completely, with one of the two new lines, depending on which type of Date/Time you prefer.
Reply With Quote
  #76  
Old 21.04.2017, 01:28
verheiratet1952 verheiratet1952 is offline
Bandwidth Beast
 
Join Date: Jan 2016
Posts: 148
Default

what about csv files larger than 5mb? all links will be crawled by linkgrabber?
Reply With Quote
  #77  
Old 21.04.2017, 02:01
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 48,605
Default

Examples please

GreeZ psp
__________________

Ad-free installers || Werbefreie Installer
Windows Setup<--JD2 BETA-->Linux Setup x86 || Linux Setup x64 || Mac Setup
-----=>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
  #78  
Old 21.04.2017, 09:45
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

I will update Linkcrawler to support larger files
After next core update, Settings-Advanced Settings, search for DeepDecryptFileSizeLimit
set max 50 mbyte or -1 for unlimited
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 21.04.2017 at 09:47.
Reply With Quote
  #79  
Old 21.04.2017, 14:27
verheiratet1952 verheiratet1952 is offline
Bandwidth Beast
 
Join Date: Jan 2016
Posts: 148
Default

Quote:
Originally Posted by Jiaz View Post
I will update Linkcrawler to support larger files
After next core update, Settings-Advanced Settings, search for DeepDecryptFileSizeLimit
set max 50 mbyte or -1 for unlimited
next core update is already scheduled? in a few days, weeks or months?

I am just asking because sometimes it's working with 7-12mb csv files, and sometimes there is nothing happening...
Reply With Quote
  #80  
Old 21.04.2017, 14:40
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,145
Default

its already live,
the change that jiaz uploaded to implement those features was
https://svn.jdownloader.org/projects...evisions/36645
and last build full was on https://svn.jdownloader.org/projects...evisions/36649
you can usually see/monitor here, but there are projects used which do not have redmine front end https://svn.jdownloader.org/projects/jd/repository
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
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 09:05.
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.