View Single Post
Old 26.07.2020, 18:31
ominus ominus is offline
JD Alpha
Join Date: Jun 2012
Posts: 22
Default Dynamic Variable doesn't work when Regular Expressions are enabled

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:*

and the url for the direct photos, regardless of the account name, has the pattern:*

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.


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:

Last edited by ominus; 26.07.2020 at 19:18.
Reply With Quote