#1
|
|||
|
|||
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 =) |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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 :/ |
#4
|
||||
|
||||
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 |
#5
|
|||
|
|||
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 01:48. |
#6
|
||||
|
||||
Yap
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#7
|
||||
|
||||
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. :] |
#8
|
|||
|
|||
Quote:
Yes its a common structure, i just sent exactly what i need to pspzockerscene, lets see if i can achieve! |
#9
|
||||
|
||||
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 Last edited by pspzockerscene; 01.04.2015 at 02:20. Reason: Updated screenshot - I failed @ paint :D |
#10
|
|||
|
|||
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? |
#11
|
||||
|
||||
Quote:
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#12
|
|||
|
|||
Oh, now its working, i just need something to remove the "_" between each word, can you add it?
|
#13
|
||||
|
||||
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 |
#14
|
|||
|
|||
Thats fine! Thanks for the quick help and solution you provided, ill take a look on these tools =)
|
#15
|
||||
|
||||
Thanks for your feedback
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#16
|
|||
|
|||
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? |
#17
|
|||
|
|||
link example **External links are only visible to Support Staff****External links are only visible to Support Staff**
|
#18
|
||||
|
||||
@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. :] |
#19
|
|||
|
|||
@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 03:18. |
#20
|
|||
|
|||
i tried with
.+blogspot\.com/\d+/(.+)\m22 and several other ways and still can't get the name to be the final characters |
#21
|
||||
|
||||
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. :] |
#22
|
|||
|
|||
@raztoki please tellme if you could help me with this, i would appretiate it
.+blogspot\.com/\d+/(.+)m22 still not getting results i need :( |
#23
|
|||
|
|||
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
|
#24
|
||||
|
||||
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. :] |
#25
|
|||
|
|||
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 |
#26
|
|||
|
|||
i actually ended up replacing
https?://\d+\.\w+\.blogspot\.com/(.*?)=m22 with https?://\d+\.\w+\.blogspot\.com/(.*?)=m since like 3% ended in m18 |
#27
|
||||
|
||||
ok
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#28
|
|||
|
|||
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? |
#29
|
||||
|
||||
Please provide real example links. Then we can check/provide help
__________________
JD-Dev & Server-Admin |
#30
|
||||
|
||||
scarecrow1 PMed me (maybe his new account is still not allowed to post):
Quote:
__________________
FAQ: How to upload a Log |
#31
|
||||
|
||||
I've activated his account
__________________
JD-Dev & Server-Admin |
#32
|
||||
|
||||
Can you tell him to please open a thread about this
__________________
JD-Dev & Server-Admin |
#33
|
||||
|
||||
Done.
__________________
FAQ: How to upload a Log |
#34
|
|||
|
|||
Last edited by Jiaz; 10.10.2018 at 08:45. Reason: Edit by Jiaz |
#35
|
|||
|
|||
Super helpful thread!
|
|
|