#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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 17:16. Reason: More details |
#4
|
||||
|
||||
Quote:
so you need to add #name=filename to the urls
__________________
JD-Dev & Server-Admin |
#5
|
|||
|
|||
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. |
#6
|
||||
|
||||
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 |
#7
|
|||
|
|||
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 # |
#8
|
||||
|
||||
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 |
#9
|
||||
|
||||
@hoss: please see https://board.jdownloader.org/showpo...27&postcount=6
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|