JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 11.01.2016, 07:22
unknowncolor unknowncolor is offline
Modem User
 
Join Date: Jan 2016
Posts: 4
Default Renaming files using Packagizer - How to create rule

I created a text file containing download links collected from a forum.

The download links result in the download of files with filenames that NOT desirable.

I've modified the text file containing links by adding info from the html code of the download page to the end of the download link after a # (got this idea from I post I saw here).

This is what I'm talking about (the attached links are for illustrated purposes only):

original download link in my text file

videos.someforum.com/attachment.php?attachmentid=1668554322
videos.someforum.com/attachment.php?attachmentid=7844285398
videos.someforum.com/attachment.php?attachmentid=5387226488

original filename saved to disk using original download link

vid_478.mp4
vid_864.mp4
vid_hd_7836.avi

modified download link in my text file

videos.someforum.com/attachment.php?attachmentid=1668554322#temple_of_doom__
videos.someforum.com/attachment.php?attachmentid=1668554322#raiders_of_the_lost_ark__
videos.someforum.com/attachment.php?attachmentid=1668554322#last_crusade__

desired filename saved to disk using Packagizer rule

temple_of_doom__vid_478.mp4
raiders_of_the_lost_ark__vid_864.mp4
last_crusade__vid_hd_7836.avi

I want to add the extra text after the # in the download link to the beginning of the filename of the downloaded file for each link.

I have thousands and thousands of links to download.
I used sed, awk and cat to process thousands of html pages thus resulting in a nice text file containing only links I want - the added text is actually the topic of the thread in which the attached file is located in the forum.

Detailed help in creating the proper Packagizer rule in JDownloader would be most useful.

I am struggling to understand regex.

Thanks.
Reply With Quote
  #2  
Old 11.01.2016, 09:57
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 70,222
Default

Create a new Packagizer Rule
If->SourceURL contains #name=(.+), enable Regex checkbox
Then set->Filename <jd:source:1>

Note. I added #name instead, but # should also work fine
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 12.04.2016, 16:07
unknowncolor unknowncolor is offline
Modem User
 
Join Date: Jan 2016
Posts: 4
Default

Finally, got back to trying out this packagizer rule with JDownloader

I created the rule in packagizer - all three steps mentioned by Jiaz.

I pasted in a few links containing a # followed by desired prefix to file name.



Problem, I only get the original file names for the downloaded files - downloaded file name is never added.

I can't figure out what I'm doing wrong.

Not too intuitive.

I'm using the latest JDownloader 2 Beda - downloaded it April 11.

I haven't used JDownloader to download before now.

Just noticed, the links are slightly different from my first post - basically just a link to an image, for example.

example.com/pictures/some_pics/38728.jpg#my_new_file_name

Last edited by unknowncolor; 12.04.2016 at 16:16. Reason: More details
Reply With Quote
  #4  
Old 12.04.2016, 17:49
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 70,222
Default

Quote:
If->SourceURL contains #name=(.+), enable Regex checkbox
that rules depends on the format url#name=filename
so you need to add #name=filename to the urls
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 12.04.2016, 19:18
unknowncolor unknowncolor is offline
Modem User
 
Join Date: Jan 2016
Posts: 4
Default

Hi Jiaz,

If the sample url is:

example.com/pictures/some_pics/38728.jpg#my_new_file_name

What exactly am I supposed to type in the

If->SourceURL contains

field?

I think I got this thing to work originally - that's why I said "SOLVED" but now that I look at this post I have no idea what I typed to get it to work.

I must be missing some logic?

Sorry for asking this.
Reply With Quote
  #6  
Old 13.04.2016, 09:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 70,222
Default

example.com/pictures/some_pics/38728.jpg#my_new_file_name
so use
SourceURL contains .*?#(.+)
and enable Regex checkbox

that should work for such links!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 09.11.2020, 17:55
hoss hoss is offline
Modem User
 
Join Date: Nov 2020
Posts: 2
Default

Hi Jiaz, I am new to Jdownloader
I have the same issue and this doesn't work in my jdownloader
example.com/pictures/some_pics/38728.mp4#my_new_file_name
my file name are always 88728.mp4
Linkgrabber does not change the name to what is after #
Reply With Quote
  #8  
Old 09.11.2020, 17:57
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 57,360
Default

Hi,

Please post your full packagizer rule here (either post a screenshot or export, .zip it and attach it to your next forum post).

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || 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
Reply With Quote
  #9  
Old 09.11.2020, 18:06
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 70,222
Default

@hoss: please see https://board.jdownloader.org/showpo...27&postcount=6
__________________
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 12:16.
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 - 2021, Jelsoft Enterprises Ltd.