JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 29.07.2020, 12:09
ominus ominus is offline
JD Alpha
 
Join Date: Jun 2012
Posts: 22
Default artstation.com Packagizer rule Help with negative lookahead regex

Hello

I need to create two different package rules for the same domain but based on whether it contains www. or not., since the original package name changes for each case.

more specifically, I have these two urls:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**

I use Source Contains with regex enabled and this pattern:
(?<!www)\.artstation\.com

but it matches both urls, when it should match only NAME.artstation.com and not WWW. artstation.com
I tested with multiple variations of the above pattern, always both urls match or they dont match at all.

some examples:
^(?<!www)\.artstation\.com none match
^(?<!www).+\.artstation\.com both match
(?!www)\.artstation\.com both match

what is strange, is that I test the pattern with this java regex tester, and the original pattern does work, it matches only the second url name.arstation.com as it should:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

so what am I doing wrong here?

Last edited by ominus; 29.07.2020 at 12:13.
Reply With Quote
  #2  
Old 29.07.2020, 14:02
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,103
Default

Hello ominus,

1. We have a crawler plugin for this website which seems to work fine here and already accepts both of your given URL-types.
You cannot create link crawler rules for websites which we're already supporting via plugin.
In case this is what you want to do - we have a ticket (feature request) for this:


2. Why do you even try to create a link crawler rule for this website?
What do you want to accomplish that our current crawler cannot do?

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #3  
Old 29.07.2020, 14:37
ominus ominus is offline
JD Alpha
 
Join Date: Jun 2012
Posts: 22
Default

I dont want to create crawler rules, I want to create packagizer rules to set specific package and folder names for the downloaded albums.
I have already created a rule for the url pattern **External links are only visible to Support Staff**www.arstation.com/NAME

SourceUrl Contains www\.artstation\.com/(?!artwork)(.+) regex enabled
Download Dir C:\Artstation\<jd:source:1>\<jd:packagename>\
Package Name <jd:source:1><jd:orgpackagename>

this rule works fine, it creates the albums folders with the names I need.
But now I discovered that artstation also comes with this url pattern:

NAME.artstation.com

If I try to download this url , while the above rule is enabled, I get a complete mess in the linkgrabber, instead of separated albums/packages, i get separated images with their own package names which is a very long name.

So my approach is to keep the one working rule for the url pattern **External links are only visible to Support Staff**www.artstation/NAME and create a new rule for the url pattern NAME.artstation.com. But I cant accomplish this because the negative lookahead doesnt work at all (?!www), it always matches both urls with or without www.

And I am stuck there now.
Reply With Quote
  #4  
Old 29.07.2020, 15:34
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,103
Default

Hi again,

sorry for the misunderstanding!

This one is a bit tricky ...

I've added a plugin property for you which will be available after the next update.
You can then deactivate your two rules and instead use this one:


Wartest du auf einen angekündigten Bugfix oder ein neues Feature?
Updates werden nicht immer sofort bereitgestellt!
Bitte lies unser Update FAQ! | Please read our Update FAQ!

---
Are you waiting for recently announced changes to get released?
Updates to not necessarily get released immediately!
Bitte lies unser Update FAQ! | Please read our Update FAQ!


-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
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 03:06.
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.