JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 22.02.2020, 08:27
RPNet-user RPNet-user is offline
JD Addict
 
Join Date: Apr 2017
Posts: 169
Default multiple deepPatterns in linkcrawler rules

Is it possible to create a set(two) of deepPattern in linkcrawler rules?
I tried in the following method but it did not work for both, it only accepts 'one or the other' 'not both'.
By default the first one works unless I disable it so that the second works instead.

[ {

},{

} ]
Reply With Quote
  #2  
Old 22.02.2020, 10:34
RPNet-user RPNet-user is offline
JD Addict
 
Join Date: Apr 2017
Posts: 169
Default

scratch that, I just needed the | between the first and second adjacent DP.
Reply With Quote
  #3  
Old 24.02.2020, 17:58
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 53,757
Default

Exactly.
Multiple patterns as a json array is not possible but you should be able to make it work just by using a big Regular Expression

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || 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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #4  
Old 03.03.2020, 11:06
RPNet-user RPNet-user is offline
JD Addict
 
Join Date: Apr 2017
Posts: 169
Default

The | works for multiple/several deepPatterns from 'one pattern' but what if one were to require a second separate pattern and a deepPattern to go along with that pattern? Would the | apply as well? or is this limited to one single pattern/domain only?
Reply With Quote
  #5  
Old 03.03.2020, 11:13
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,183
Default

single pattern is only possible far as im aware. Guess you could try multiples.
if you primary pattern is for different, and you need different deepPatterns for each you are better off with two seperate rules than trying to combine
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #6  
Old 03.03.2020, 13:26
RPNet-user RPNet-user is offline
JD Addict
 
Join Date: Apr 2017
Posts: 169
Default

Quote:
Originally Posted by raztoki View Post
single pattern is only possible far as im aware. Guess you could try multiples.
if you primary pattern is for different, and you need different deepPatterns for each you are better off with two seperate rules than trying to combine
So one can have two separate rules? I didn't think this was possible, which is why i was inquiring about a 2nd pattern with its own deepPattern rule, if that is the case, than yes it would be better to have two separate rules.
Reply With Quote
  #7  
Old 03.03.2020, 14:36
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,183
Default

rule pattern deepPattern
1 unique whateveryouwant
2 unique whateveryouwant

I wasn't sure, just a guess. so I recommended you test otherwise you have have multiple deep patterns per rule. just to confirm either way.

if you can only have a single deepPattern then would need to combine a|b
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 03.03.2020 at 14:41.
Reply With Quote
  #8  
Old 04.03.2020, 02:53
RPNet-user RPNet-user is offline
JD Addict
 
Join Date: Apr 2017
Posts: 169
Default

I was thinking of something like:

Code:
[ {
  "enabled" : true,
  "maxDecryptDepth" : 1,
  "name" : "site1",
  "pattern" : "pattern1.for.site1",
  "rule" : "DEEPDECRYPT",
  "packageNamePattern" : null,
  "deepPattern" : "(deeppattern.for.pattern1)"
},{
  "enabled" : true,
  "maxDecryptDepth" : 1,
  "name" : "site2",
  "pattern" : "pattern2.for.site2",
  "rule" : "DEEPDECRYPT",
  "packageNamePattern" : null,
  "deepPattern" : "(deeppattern.for.pattern2)"
} ]
Reply With Quote
  #9  
Old 04.03.2020, 03:19
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,183
Default

I have a feeling if it works like other plugins it only enters the first rule. so as long as pattern1 is different from pattern2 it will work. I dont use linkcrawling rules much, just created test rules when it first came out.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #10  
Old 04.03.2020, 06:14
RPNet-user RPNet-user is offline
JD Addict
 
Join Date: Apr 2017
Posts: 169
Default

Right, when I tested using the same pattern for both, it only entered the 1st-pattern by default as you said. I will test with two unique/different pattern/deeppaterns just to see results.
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 02:27.
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 - 2020, Jelsoft Enterprises Ltd.