JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01.04.2015, 00:23
mumi
Guest
 
Posts: n/a
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: 70,922
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?
Reply With Quote
  #3  
Old 01.04.2015, 00:55
mumi
Guest
 
Posts: n/a
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: 70,922
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?
Reply With Quote
  #5  
Old 01.04.2015, 02:42
mumi
Guest
 
Posts: n/a
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: 70,922
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?
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,611
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
Guest
 
Posts: n/a
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: 70,922
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?

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
Guest
 
Posts: n/a
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: 70,922
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?
Reply With Quote
  #12  
Old 01.04.2015, 03:22
mumi
Guest
 
Posts: n/a
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: 70,922
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?
Reply With Quote
  #14  
Old 01.04.2015, 03:36
mumi
Guest
 
Posts: n/a
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: 70,922
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?
Reply With Quote
  #16  
Old 14.03.2016, 22:40
oxar7
Guest
 
Posts: n/a
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
Guest
 
Posts: n/a
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,611
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
Guest
 
Posts: n/a
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
Guest
 
Posts: n/a
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
  #21  
Old 15.03.2016, 04:32
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

just like psp example, just change the regular expression to suit blogspot url structure. Listen to the component you want to use as filename.

If you can't figure it out yourself this does work

Spoiler:

Code:
[ {
  "filetypeFilter" : {
    "enabled" : false,
    "audioFilesEnabled" : false,
    "matchType" : "IS",
    "useRegex" : false,
    "hashEnabled" : false,
    "videoFilesEnabled" : false,
    "docFilesEnabled" : false,
    "archivesEnabled" : false,
    "imagesEnabled" : false,
    "customs" : null
  },
  "originFilter" : {
    "enabled" : false,
    "matchType" : "IS",
    "origins" : [ ]
  },
  "hosterURLFilter" : {
    "enabled" : false,
    "matchType" : "CONTAINS",
    "regex" : "",
    "useRegex" : false
  },
  "onlineStatusFilter" : {
    "enabled" : false,
    "matchType" : "IS",
    "onlineStatus" : "OFFLINE"
  },
  "chunks" : -1,
  "created" : 1458008625583,
  "sourceURLFilter" : {
    "enabled" : true,
    "matchType" : "CONTAINS",
    "regex" : "https?://\\d+\\.\\w+\\.blogspot\\.com/(.*?)=m22",
    "useRegex" : true
  },
  "conditionFilter" : {
    "enabled" : false,
    "matchType" : "IS_TRUE",
    "conditions" : [ ]
  },
  "testUrl" : "**External links are only visible to Support Staff**,
  "valid" : true,
  "filename" : "<jd:source:1>.<jd:orgfiletype>",
  "packagenameFilter" : {
    "enabled" : false,
    "matchType" : "CONTAINS",
    "regex" : "",
    "useRegex" : false
  },
  "filenameFilter" : {
    "enabled" : false,
    "matchType" : "CONTAINS",
    "regex" : "",
    "useRegex" : false
  },
  "name" : "blogspot",
  "matchAlwaysFilter" : {
    "enabled" : false
  },
  "pluginStatusFilter" : {
    "enabled" : false,
    "matchType" : "IS",
    "pluginStatus" : "PREMIUM"
  },
  "filesizeFilter" : {
    "enabled" : false,
    "from" : 0,
    "matchType" : "BETWEEN",
    "to" : 0
  }
} ]
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #22  
Old 15.03.2016, 04:36
oxar7
Guest
 
Posts: n/a
Default

@raztoki please tellme if you could help me with this, i would appretiate it


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

still not getting results i need :(
Reply With Quote
  #23  
Old 15.03.2016, 04:47
oxar7
Guest
 
Posts: n/a
Default

thanks for helping me, but i have no idea where to put that script, i was hoping you could tell me how to fill the packagizer just like psp did with a screenshot the thing is i have no clue on the " \ . / + ( d+ " relevance or what character to use in which scenario, i have done ffmpg minor things in the past but that was a lucky strike i guess
Reply With Quote
  #24  
Old 15.03.2016, 04:53
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

copy paste save as packagiser rule, then import, done
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #25  
Old 15.03.2016, 05:02
oxar7
Guest
 
Posts: n/a
Default

thanks, you helped me get what i wanted, later on i could do something in excel for it to rename all the files to the actual movie names, i would have never been able to do it by myself


i hope i didnt make you waste a lot of your time
Reply With Quote
  #26  
Old 15.03.2016, 05:10
oxar7
Guest
 
Posts: n/a
Default

i actually ended up replacing
https?://\d+\.\w+\.blogspot\.com/(.*?)=m22
with
https?://\d+\.\w+\.blogspot\.com/(.*?)=m

since like 3% ended in m18
Reply With Quote
  #27  
Old 15.03.2016, 05:27
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

ok
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #28  
Old 17.05.2016, 21:00
oxar7
Guest
 
Posts: n/a
Default

ok... website changed inner structure, i managed to download like 40% of the files i wanted(around 400 movies) and now i have to get a workaround

url structure is like this (ignore blankspaces but dont ignore underscores)

http : // movies. tv/ movie_title/ (this last forward slash is really important , without it it takes you to a 404 page)

and after adding the link the mp4 it finds will actually be called "videoplayback" without even the .mp4 extension at the end

now the thing is when i add the link it also detects about 12 pictures and a little video for youtube which happens to be the trailer of the movie

and heres what i would like to happen:

i would like for me to just have to add 700 links like that one and just get the mp4, each of them named after the webpage itself, the mp4 extension is not so important I could fix that in 5 seconds in bulk with a program i have (bulk rename utility)

any ideas how to get this result?
Reply With Quote
  #29  
Old 17.05.2016, 21:43
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

Please provide real example links. Then we can check/provide help
__________________
JD-Dev & Server-Admin
Reply With Quote
  #30  
Old 09.10.2018, 15:23
tony2long's Avatar
tony2long tony2long is offline
English Supporter
 
Join Date: Jun 2009
Posts: 6,507
Default

scarecrow1 PMed me (maybe his new account is still not allowed to post):
Quote:
Originally Posted by scarecrow1
I am downloading videos from vshare.io. and I want to rename those video with source URL key.

Link structure.
Code:
**External links are only visible to Support Staff**
Here
Code:
239t42d
is the key.

I want to rename my downloaded file to that key name.

I have seen a post where you explained it. But I can't make it work. I have tried
Code:
.+vshare\.io/v/*
.

And it never worked. Can you help, please?

Thanks in advance
__________________
FAQ: How to upload a Log
Reply With Quote
  #31  
Old 09.10.2018, 15:42
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

I've activated his account
__________________
JD-Dev & Server-Admin
Reply With Quote
  #32  
Old 09.10.2018, 18:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

Can you tell him to please open a thread about this
__________________
JD-Dev & Server-Admin
Reply With Quote
  #33  
Old 09.10.2018, 19:30
tony2long's Avatar
tony2long tony2long is offline
English Supporter
 
Join Date: Jun 2009
Posts: 6,507
Default

Done.
__________________
FAQ: How to upload a Log
Reply With Quote
  #34  
Old 09.10.2018, 21:24
scarecrow1
Guest
 
Posts: n/a
Default

https://board.jdownloader.org/showthread.php?t=78907

Last edited by Jiaz; 10.10.2018 at 09:45. Reason: Edit by Jiaz
Reply With Quote
  #35  
Old 13.12.2018, 16:54
plancked
Guest
 
Posts: n/a
Default

Super helpful thread!
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:32.
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 - 2024, Jelsoft Enterprises Ltd.