|
[Solved] Dynamic Variable doesn't work when Regular Expressions are enabled |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Dynamic Variable doesn't work when Regular Expressions are enabled
Hello.
I want to create two package rules for Artstation, one for the full galleries and one for the direct links to single photos. the url for the albums has the pattern: artstation.com/account_name/* and the url for the direct photos, regardless of the account name, has the pattern: artstation.com/artwork/* I need to distinguish the two package rules based on the above patterns. for the first rule, I used SourceUrl Contains artstation\.com/(?!artwork) with regex enabled the regex works fine BUT the <jd:source:1> dynamic variable doesnt work at all when regex is enabled. it doesnt appear in the right click context menu with the dynamic variables, and even if I type it in the Download Directory input field, it just becomes the raw text of the variable's name which gives me a directory error when I start downloading the album. I need the <jd:source:1> variable because it gives me the account_name of the album, which I use as the main folder's name where I download the albums (many accounts have multiple albums). So I am stuck here and I dont know how to fix it. I found this topic which shows that <jd:source:1> does work, even when regex is enabled as shown in the screenshot in the link. So I dont understand what I am doing wrong. https://board.jdownloader.org/showpo...56&postcount=9 UPDATE: ok, I found the solution, all I needed was to add (.+) which is what enables the source dynamic variable listener when you use regular expressions. so the first rule becomes SourceUrl Contains artstation\.com/(?!artwork)(.+) with regex enabled and now I can get the account name. This is explained in this topic: https://board.jdownloader.org/showthread.php?t=39214 Last edited by ominus; 26.07.2020 at 18:18. |
#2
|
||||
|
||||
the lister for wildcard is "*" , with regex you need listeners within "(.+)" or say "(a|b|c)".
psp screen shot has correct patterns in respects to a listener been active. raztoki
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#3
|
|||
|
|||
thank you, raztoki, I added the missing syntax and now the source dynamic variable works fine. thank you.
|
#4
|
||||
|
||||
I see you've found it now, maybe by yourself or by my post.
your edit was 2mins after my post, so either possible ;
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
|
|