JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 20.11.2020, 08:32
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Post Keep "Downloaded from - Download url" in the "File name".

Hello, how about I have been viewing the JDownloader forum for 9 hours but there is nothing that is exact for what I am looking for.

I give you an example of a website:

Original Link:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

File name:
ed4c85679cf0100d7b1a62cea923978b.png

use this rule:
Url Fonts: Contains ^ ([^ + *] +) \. * $
Regular expressions are enabled

File name: <jd: source: 1>

And it returns the file name to me:
https_font-1001freefonts.netdna-ssl.com_storage_preview_cache_1257_ed4c85679cf0100d7b1a62cea923978b.png

If you see the Original link and the link that Returns with the rule, the lines / converts them to _, I would like to keep the original link within the file name so that I can review it in the excel table.

I found out that if I do this:
use this rule:
Url Fonts: Contains *
Regular expressions are disabled

File name: <jd: source: 1>

returns the file name:
https_font-1001freefonts.netdna-ssl.com_storage_preview_cache_1257_ed4c85679cf0100d7b1a62cea923978b.png

In short I need the "Original Link" as filename all in one folder:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

I ask you to help me with this rule. And in advance I thank you for your collaboration.
Reply With Quote
  #2  
Old 20.11.2020, 14:05
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 68,209
Default

You cannot place URL into filename because URLs contain forbidden chars like /

You can customize the copy action, see
https://board.jdownloader.org/showpo...76&postcount=5
and
https://board.jdownloader.org/showpo...65&postcount=7
Then you can mass select the links -> copy -> contains the information you want
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 20.11.2020, 14:07
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 68,209
Default

You can also use Eventscripter (see https://board.jdownloader.org/showthread.php?t=70525) and write/use script that exports the information you need. Ask mgpai for help/hints
__________________
JD-Dev & Server-Admin
Reply With Quote
  #4  
Old 21.11.2020, 16:44
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Default

Quote:
Originally Posted by Jiaz View Post
You cannot place URL into filename because URLs contain forbidden chars like /

You can customize the copy action, see
**External links are only visible to Support Staff**...
and
**External links are only visible to Support Staff**...
Then you can mass select the links -> copy -> contains the information you want

It happens that there are more than 100,000 links, if I do it that way it would take me a lifetime. For that reason I chose the packer tool to do it automatically.
Reply With Quote
  #5  
Old 21.11.2020, 16:59
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Default

Quote:
Originally Posted by Jiaz View Post
You can also use Eventscripter (see **External links are only visible to Support Staff**...) and write/use script that exports the information you need. Ask mgpai for help/hints

When I referred to a folder, this is what the system does by default, I just need to convert the _ to the / so that the original link is preserved.
Reply With Quote
  #6  
Old 21.11.2020, 17:07
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Default

Quote:
Originally Posted by Jiaz View Post
You can also use Eventscripter (see **External links are only visible to Support Staff**...) and write/use script that exports the information you need. Ask mgpai for help/hints
I don't know anything about programming, for that reason I was looking at how to use regular expressions.
Reply With Quote
  #7  
Old 21.11.2020, 17:25
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 991
Default

Quote:
Originally Posted by andersontad View Post
In short I need the "Original Link" as filename all in one folder:
I am guessing you mean you want to have the same folder structure on the disk as in the url. JD does that automatically for select sites like mega/google etc., using predefined packagizer rules. But, if the site/url is not supported by plugin, you will have to create custom packagizer rules, or use eventscripter, as explained in THIS thread.
Reply With Quote
  #8  
Old 21.11.2020, 17:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 68,209
Default

It's not just about the /, there are other characters as well. You can also use mass selection and copy to clipboard or use Eventscripter script (ask mgpai for help/hints) that writes out the information that you need. But doesn't make sense putting url into filename because of special/forbidden characters and length of filename
__________________
JD-Dev & Server-Admin
Reply With Quote
  #9  
Old 21.11.2020, 17:55
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Default

Quote:
Originally Posted by Jiaz View Post
It's not just about the /, there are other characters as well. You can also use mass selection and copy to clipboard or use Eventscripter script (ask mgpai for help/hints) that writes out the information that you need. But doesn't make sense putting url into filename because of special/forbidden characters and length of filename

Well, maybe it doesn't make sense, but in an excel list of 100,000 links, it does make sense, because if you don't have the full link, Excel won't find the file, it already does several tests. all without success, if you have a better idea I would receive it.
Reply With Quote
  #10  
Old 21.11.2020, 18:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 68,209
Default

I'm sorry but I don't understand url - filename and excel list. What exactly do you want to achieve?
You can create a script that reads text file and then for example remove lines that have file in list, or anything else

We can provide better help but you must better explain what you are trying to do
__________________
JD-Dev & Server-Admin
Reply With Quote
  #11  
Old 21.11.2020, 18:11
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Default

Quote:
Originally Posted by Jiaz View Post
I'm sorry but I don't understand url - filename and excel list. What exactly do you want to achieve?
You can create a script that reads text file and then for example remove lines that have file in list, or anything else

We can provide better help but you must better explain what you are trying to do
Of course, if Jiaz, look I have the download links of the images in an excel cvs database, I copy the links to JDownloader by blocks of 100 until I solve this problem. Because I need to keep the original link, because each link is an "Image that has a defined name" if I lose the chain of the complete link I could not find its name in the database or run a program that replaces names, But if I have your Original link can I change
name.

Example:

Name: Merry

Original Link: **External links are only visible to Support Staff****External links are only visible to Support Staff**

When the image is downloaded it must have a reference name, in this case the download link to identify it in the database and then name it Merry.

I use Excel and Cal from LibreOficce.
Reply With Quote
  #12  
Old 21.11.2020, 18:40
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 991
Default

So, after the file is downloaded, you want to replace the file name from the url, with the one in the spreadsheet? Or, do you need to access the url for any other purpose?
Reply With Quote
  #13  
Old 21.11.2020, 18:53
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Default

Quote:
Originally Posted by mgpai View Post
So, after the file is downloaded, you want to replace the file name from the url, with the one in the spreadsheet? Or, do you need to access the url for any other purpose?

Exactly, when the image is downloaded I will rename it with the real name Merry that is in the database. To do that, I take the Original link from the download and look for it in excel, and I look at the previous cell to name the image "Merry" in the folder that Jdownloader creates called "miscellaneous".
Reply With Quote
  #14  
Old 21.11.2020, 19:01
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 991
Default

Quote:
Originally Posted by andersontad View Post
... I take the Original link from the download and look for it in excel, and I look at the previous cell to name the image "Merry" in the folder that Jdownloader creates called "miscellaneous".
You can append the filename to the url before adding it to JD, and then parse the filename from it using a packagizer rule.

Example URL Format:
Code:
https://board.jdownloader.org/images/logo.png#filename=merry

Packagizer Rule:
Code:
If sourceurl(s) > contain > #filename=*
Then set > Filename > <jd:source:1>.<jd:orgfiletype>

JD will then download the file with the new name.
Reply With Quote
  #15  
Old 21.11.2020, 19:05
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Default

Quote:
Originally Posted by mgpai View Post
You can append the filename to the url before adding it to JD, and then parse the filename from it using a packagizer rule.

Example URL Format:
Code:
https://board.jdownloader.org/images/logo.png#filename=merry

Packagizer Rule:
Code:
If sourceurl(s) > contain > #filename=*
Then set > Filename > <jd:source:1>.<jd:orgfiletype>

JD will then download the file with the new name.

When I mean to take the original link, it is to go to the "Various" folder and look for the downloaded file, in this case the image, which has a name for example this:

https_font-1001freefonts.netdna-ssl.com_storage_preview_cache_25729_ed4c85679cf0100d7b1a62cea923978b

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

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

Most of the images have this string at the end of the link: ed4c85679cf0100d7b1a62cea923978b.

What JDownloader does is:

ed4c85679cf0100d7b1a62cea923978b
ed4c85679cf0100d7b1a62cea923978b_2
ed4c85679cf0100d7b1a62cea923978b_3

If you carry that fragment of link it is useless, because they all have that same chain.

In order to be more accurate, you should have at least this fragment:

> 25729 / ed4c85679cf0100d7b1a62cea923978b

Create a rule in the packager in the option Sources Url - Contains - *

and it returns the link:
https_font-1001freefonts.netdna-ssl.com_storage_preview_cache_25729_ed4c85679cf0100d7b1a62cea923978b

It is an advance, but since I cannot transform the _ to / from JDownloader, then I would have to look for another formula.

Last edited by andersontad; 21.11.2020 at 19:12.
Reply With Quote
  #16  
Old 21.11.2020, 19:14
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 991
Default

Perhaps I have not understood your requirement correctly. If you are free, can you contact me in JD Chat?

Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader
Reply With Quote
  #17  
Old 21.11.2020, 20:07
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Default

Thank you very much for your collaboration.
Reply With Quote
  #18  
Old 22.11.2020, 00:54
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,226
Default

Did you find a working solution?
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #19  
Old 22.11.2020, 02:14
andersontad andersontad is offline
Junior Loader
 
Join Date: Nov 2020
Posts: 10
Default

Quote:
Originally Posted by raztoki View Post
Did you find a working solution?

Yes sir, the answer was given by mgpai. Anyway I leave the solution here:

Code:
https://board.jdownloader.org/images/logo.png#filename=merry

Code:
If sourceurl(s) > contain > #filename=*
Then set > Filename > <jd:source:1>.<jd:orgfiletype>
Reply With Quote
  #20  
Old 23.11.2020, 17:53
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 68,209
Default

@mgpai: Thanks for the help Fast/correct, on the point Perfect!

@andersontad; Thanks for the feedback, so it comes down to set pre-defined names for downloading
__________________
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 20:13.
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 - 2020, Jelsoft Enterprises Ltd.