JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
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

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 19:18.
Reply With Quote
  #2  
Old 26.07.2020, 19:16
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,659
Default

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. :]
Reply With Quote
  #3  
Old 26.07.2020, 19:21
ominus ominus is offline
JD Alpha
 
Join Date: Jun 2012
Posts: 22
Default

thank you, raztoki, I added the missing syntax and now the source dynamic variable works fine. thank you.
Reply With Quote
  #4  
Old 26.07.2020, 19:53
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,659
Default

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. :]
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 10:01.
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.