JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 01.04.2015, 00:23
mumi mumi is offline
Baby Loader
 
Join Date: Apr 2015
Posts: 7
Default How to rename files with source urls via regex - JD2

Hi, im downloading videos from one adult site and lets say the post title is "Blablabla Bla Blabla", the url is "**External links are only visible to Support Staff** but the file name is kioakw.mpg

How can i add a regex to change the original file name to the source url name, removing the "**External links are only visible to Support Staff**, the "_" between words and the ".html" on the end, leaving only with the post name itself.

Hope you guys can help me

Thanks =)
Reply With Quote
  #2  
Old 01.04.2015, 00:26
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 55,297
Default

You can do this via a packagizer rule.
Settings --> Packagizer
Just play around with it a bit and you should be able to figure it out.
In this case it might even work with wildcards-only instead of RegEx

GreeZ 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
  #3  
Old 01.04.2015, 00:55
mumi mumi is offline
Baby Loader
 
Join Date: Apr 2015
Posts: 7
Default

Thanks for the quick response, btw i know exactly nothing about creating regex codes, but im playing with the packagizer options.

You or anybody that know how to created some regex/wildcard rules can give me at least an idea on how to create something like this?

My "idea" for doing what i need on packagizer is to

Match any files

Then set filename to => downloadurl

Then do => rename to downloadurl minus siteulr.com , .html and _

Thats it

I just dont know how to fill this rules in the fields :/
Reply With Quote
  #4  
Old 01.04.2015, 02:29
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 55,297
Default

I need example links and I need to know what you want to do to help you...
__________________
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
  #5  
Old 01.04.2015, 02:42
mumi mumi is offline
Baby Loader
 
Join Date: Apr 2015
Posts: 7
Default

Ok, im sending infos via PM to you right? In a few minutes

edit; Just sent the pm explaining what im trying to achieve.

Last edited by mumi; 01.04.2015 at 02:48.
Reply With Quote
  #6  
Old 01.04.2015, 02:46
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 55,297
Default

Yap
__________________
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
  #7  
Old 01.04.2015, 02:49
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,227
Default

our plugins usually set filename based on what's derived from the website and not the URL. You can set via URL if you want, assuming there is a common URL structure you can parse. Think it will be harder than you realise to strip characters out of URL structure if URL doesn't have common naming structure.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #8  
Old 01.04.2015, 02:55
mumi mumi is offline
Baby Loader
 
Join Date: Apr 2015
Posts: 7
Default

Quote:
Originally Posted by raztoki View Post
our plugins usually set filename based on what's derived from the website and not the URL. You can set via URL if you want, assuming there is a common URL structure you can parse. Think it will be harder than you realise to strip characters out of URL structure if URL doesn't have common naming structure.
Thanks for the reply!

Yes its a common structure, i just sent exactly what i need to pspzockerscene, lets see if i can achieve!
Reply With Quote
  #9  
Old 01.04.2015, 03:04
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 55,297
Default

The rule is quite neutral so please forgive me that I'm posting this in public but I rather do it like this as it might help other users too
Your username seems to be quite neutral too so there is no privacy issues to worry.
Anyways, this rule should do what you want:

Note that it is only applied to all links you add AFTER making this rule!

GreeZ 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

Last edited by pspzockerscene; 01.04.2015 at 03:20. Reason: Updated screenshot - I failed @ paint :D
Reply With Quote
  #10  
Old 01.04.2015, 03:12
mumi mumi is offline
Baby Loader
 
Join Date: Apr 2015
Posts: 7
Default

Thanks, no problem posting here =)

I just prefered to PM cause its an adult site etc

Btw the first arrow is right above something on the url hehe, what it is? just a d?
Reply With Quote
  #11  
Old 01.04.2015, 03:20
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 55,297
Default

Quote:
Originally Posted by mumi View Post
Btw the first arrow is right above something on the url hehe, what it is? just a d?
I failed @ paint:rolleyes:
__________________
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
  #12  
Old 01.04.2015, 03:22
mumi mumi is offline
Baby Loader
 
Join Date: Apr 2015
Posts: 7
Default

Oh, now its working, i just need something to remove the "_" between each word, can you add it?
Reply With Quote
  #13  
Old 01.04.2015, 03:34
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 55,297
Default

Not possible as we got no replace function.
You will have to correct the filenames using an external application such as "Total Commander" or "SpeedCommander".

GreeZ 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
  #14  
Old 01.04.2015, 03:36
mumi mumi is offline
Baby Loader
 
Join Date: Apr 2015
Posts: 7
Default

Thats fine! Thanks for the quick help and solution you provided, ill take a look on these tools =)
Reply With Quote
  #15  
Old 01.04.2015, 03:46
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 55,297
Default

Thanks for your feedback
__________________
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
  #16  
Old 14.03.2016, 22:40
oxar7 oxar7 is offline
Junior Loader
 
Join Date: Mar 2016
Posts: 11
Default help with similar case

hi, i need help with a similar case, except in my
case i have 676 links from picasa (which pretty much is googlevideo
anyways) basically when i download any of the videos the name is set
as "videoplayback.mp4" i actually have a list of every video name
along with the url in excel so it wouldnt be a problem for me to
concatenate it following a structure or something similar. i dont know how
to use packagizer so it extracts the name from the link list itself... could you
please help me by telling me how to fill the packagizer so it solves
the problem i have?
Reply With Quote
  #17  
Old 14.03.2016, 23:24
oxar7 oxar7 is offline
Junior Loader
 
Join Date: Mar 2016
Posts: 11
Default

link example **External links are only visible to Support Staff****External links are only visible to Support Staff**
Reply With Quote
  #18  
Old 15.03.2016, 01:43
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,227
Default

@oxar7,
Wont work as package customiser rules, since your imported link has no reference of pretty filename you desire. You need to go back one step further and scrap a filename from the source page (like I indicated on the other thread).
__________________
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 15.03.2016, 03:51
oxar7 oxar7 is offline
Junior Loader
 
Join Date: Mar 2016
Posts: 11
Default

@raztoki ok then, how could i make the characters after ".com/" be the name of the file? unlike the url for the case above in my links there is no ".html" at the end but there is "=m22" i tried different things but every single time i ended with the filenames being "jd_source_1.mp4"

"http s://2.bp.blogspot. com/cLPtLAr-xQX6-ZxfkvdMaXsJnY7fWtgewlDWw8cnREA=m22"

so i would like file to be
named "cLPtLAr-xQX6-ZxfkvdMaXsJnY7fWtgewlDWw8cnREA"

(i put spaces on purpose, please pretend they are not there)

Last edited by oxar7; 15.03.2016 at 04:18.
Reply With Quote
  #20  
Old 15.03.2016, 04:30
oxar7 oxar7 is offline
Junior Loader
 
Join Date: Mar 2016
Posts: 11
Default

i tried with

.+blogspot\.com/\d+/(.+)\m22

and several other ways and still can't get the name to be the final characters
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 03:47.
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.