Thread: [User feedback required] LinkGrabber stripping URL components?
View Single Post
  #5  
Old 17.10.2020, 04:05
svArtist's Avatar
svArtist svArtist is offline
DSL Light User
 
Join Date: Mar 2015
Posts: 30
Default

Nice!
Turns out, I can use packagizer to do my job for me for most cases anyway!

If anyone is interested in what I did:
Sourceurl(s) -> contains -> "(#)|(customTitle=)(.+)" -> as RegEx
Link origin -> is -> Clipboard
...
Filename -> "<jd:source:3>.<jd:orgfiletype>"
Comment -> "customTitle=<jd:source:3>"

It even seems to decode the URL Component for you!

This way, if I need to do some custom stuff, I can use my EventScripter script and refer to the title.

Now I just need to come up with a way to exclude some patterns or other ways of filtering cases like mega links which use the hash symbol...
Negative look-aheads in RegEx are so ugly, I'm told...
But hey, this seems to work:
Code:
^(?:(?:https?:\/\/(?!mega\.(?:co\.)?nz)[^#]*#)|(?:.*customTitle=))([^\s&\/#]+).*$
Marked groups as non-capturing, so the only thing that appears on right click now is "Source URL Wildcard (*) #1" -> "<jd:source:1>"

Last edited by svArtist; 17.10.2020 at 04:08.
Reply With Quote