JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 23.04.2021, 15:31
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default Packagizer rule problem

I don't want to add #.jdeatme at the end of the url, as I want to add even 4 links, I have to open a text editor and put it at the end of the link and so every time it's tiring how to solve this problem, I was looking for a solution but each time to no avail. I will be grateful for any help.

My current setting:

Downloadurl contains .*example\.de/(.*?)/(.*?)(?:$|\?|#).*
Package Name <jd:orgfilename>
File Name <jd:hoster:1>_<jd:hoster:2>.html

Last edited by Student im ersten Jahr; 24.04.2021 at 01:35.
Reply With Quote
  #2  
Old 23.04.2021, 16:03
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

I'm sorry but I don't understand.
.jdeatme is just a helper extension to make JDownloader *eat/parse* the link even if not URL pattern supported.
What does it have to do with your packagizer rule?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 23.04.2021, 17:02
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

Code:
What does it have to do with your packagizer rule?
100% nothing, I just ask what to do so that I don't have to use a text editor and add every time
Text Editor:
Regex
Find $
replace with:
#.jdeatme
I don't know, so I'm asking if there is any method that will add this extension automatically?
Reply With Quote
  #4  
Old 23.04.2021, 17:19
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

Instead of jdeatme workaround, I would recommend to just setup a linkcrawler rule for those urls
https://support.jdownloader.org/Know...ple-directhttp
without knowing your URLs(no examples), it's hard to provide a pattern that appends the jdeatme
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 23.04.2021, 17:34
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

The regular expression matches my URLs, but I don't know if the rest of the pattern is correct.

An error occured
'is not a valid 'java.util.List<jd.controling.linkcrawler.LinkCrawlerRuleStorable>'

[ {
"enabled" : true,
"logging" : false,
"maxDecryptDepth" : 0,
"name" : "example rule for DIRECTHTTP",
"pattern" : "https:\\example\\.com/(20[01][0-9]|2020)/0*([1-9]|1[0-2])/(\d+[-/]\d+)|https:\\example\\.com/diary/(.*)/(\d+)-(\d+)-(\d+)",
"rule" : "DIRECTHTTP"
} ]

**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**
**External links are only visible to Support Staff****External links are only visible to Support Staff**

example.com - any hostname

Last edited by Student im ersten Jahr; 23.04.2021 at 18:07.
Reply With Quote
  #6  
Old 23.04.2021, 18:42
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

Quote:

[ {
"enabled" : true,
"logging" : false,
"maxDecryptDepth" : 0,
"name" : "example rule for DIRECTHTTP",
"pattern" : "**External links are only visible to Support Staff**,
"rule" : "DIRECTHTTP"
} ]
wrong escape and wrong url delimiter
__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 23.04.2021, 19:04
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

I only know popular regular expressions. I don't know "Java Regex".

Last edited by Student im ersten Jahr; 23.04.2021 at 19:28.
Reply With Quote
  #8  
Old 23.04.2021, 19:43
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

It's not java Regex, but you have to escape the \ because you have it inside json.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #9  
Old 23.04.2021, 19:54
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

Still an error occurs. Can't add.
**External links are only visible to Support Staff****External links are only visible to Support Staff**

[ {
"enabled" : true,
"cookies" : null,
"updateCookies" : true,
"logging" : false,
"maxDecryptDepth" : 0,
"id" : 1610136033613,
"name" : "example rule,
"pattern" : "https:\\example\\.com/(20[01][0-9]|2020)/0*([1-9]|1[0-2])/(\\d+[-/]\\d+)|https:\\example\\.com/diary/(.*)/(\\d+)-(\\d+)-(\\d+)",
"rule" : "DIRECTHTTP",
"packageNamePattern" : null,
"passwordPattern" : null,
"formPattern" : null,
"deepPattern" : null,
"rewriteReplaceWith" : null
} ]
Reply With Quote
  #10  
Old 23.04.2021, 19:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

protocol delimiter is :// and not :\\
__________________
JD-Dev & Server-Admin
Reply With Quote
  #11  
Old 23.04.2021, 20:04
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

With all due respect. I added this rule, but still without #.jdeatme it won't properly download a single html page
It doesn't even parse, even though the rule pattern is obviously correct! If you have any other idea, I turn to hearing.
Code:
[ {
  "enabled" : true,
  "cookies" : null,
  "updateCookies" : true,
  "logging" : false,
  "maxDecryptDepth" : 0,
  "id" : 1610136033614,
  "name" : "example rule",
  "pattern" : "**External links are only visible to Support Staff**,
  "rule" : "DIRECTHTTP",
  "packageNamePattern" : null,
  "passwordPattern" : null,
  "formPattern" : null,
  "deepPattern" : null,
  "rewriteReplaceWith" : null
} ]
example.com - any host
example:
**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**

Last edited by Student im ersten Jahr; 23.04.2021 at 23:03.
Reply With Quote
  #12  
Old 24.04.2021, 00:50
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,667
Default

please use service like regex101 to write your regular expression pattern. It highlights as you write, so you can see where you go wrong.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #13  
Old 24.04.2021, 01:07
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

With the rule of parse Links WORK, but with a ERROR now, no files are downloaded now.

plugins.hoster.DirectHTTP / DEFECT

Log File:
24.04.21 01.19.25 <--> 24.04.21 01.28.43 jdlog://1501825302851/


--ID:207TS:1619220314202-4/24/21 1:25:14 AM - [] -> Exception thrown at jd.controlling.downloadcontroller.SingleDownloadController.download(SingleDownloadController.java:43 8):
jd.plugins.PluginException: ERROR_FILE_NOT_FOUND|Value:-1
at jd.plugins.hoster.DirectHTTP.requestFileInformation(DirectHTTP.java:777)
at jd.plugins.hoster.DirectHTTP.requestFileInformation(DirectHTTP.java:734)
at jd.plugins.hoster.DirectHTTP.requestFileInformation(DirectHTTP.java:541)
at jd.plugins.hoster.DirectHTTP.handleFree(DirectHTTP.java:308)
at jd.plugins.PluginForHost.handle(PluginForHost.java:1227)
at jd.controlling.downloadcontroller.SingleDownloadController.download(SingleDownloadController.java:43 3)
at jd.controlling.downloadcontroller.SingleDownloadController.run(SingleDownloadController.java:615)

**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**
**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**
**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**
**External links are only visible to Support Staff****External links are only visible to Support Staff**

Last edited by Student im ersten Jahr; 24.04.2021 at 01:38.
Reply With Quote
  #14  
Old 26.04.2021, 10:53
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

wait for next core update, then those files will work
meanwhile you can modify linkcrawler rule to auto append .jdeatme
see https://support.jdownloader.org/Know...xample-rewrite
__________________
JD-Dev & Server-Admin
Reply With Quote
  #15  
Old 26.04.2021, 15:21
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

Correct rule? Put whole regular expression into ()
Replace with $1#.jdeatme


[ {
"enabled" : true,
"cookies" : null,
"updateCookies" : true,
"logging" : false,
"maxDecryptDepth" : 0,
"id" : 1610136033614,
"name" : "example rule",
"pattern" : "**External links are only visible to Support Staff**,
"rule" : "DIRECTHTTP",
"packageNamePattern" : null,
"passwordPattern" : null,
"formPattern" : null,
"deepPattern" : null,
"rewriteReplaceWith" : null
} ]
{, }
[ {
"enabled" : true,
"name" : "example rule for type REWRITE",
"pattern" : "(**External links are only visible to Support Staff**,
"rule" : "REWRITE",
"rewriteReplaceWith" : "$1#.jdeatme"
} ]
Reply With Quote
  #16  
Old 26.04.2021, 16:04
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 72,894
Default

1. Your json syntax is completely broken.
You can learn it here:
w3schools.com/js/js_json_syntax.asp

2. You can view/edit json in a comfortable way e.g. using this webtool:
jsoneditoronline.org

Please stop bothering our support about this unless you can show us some kind of personal contribution regarding your special feature wishes and constant support requests.

Also as explained by Jiaz, all you have to do in this case is wait for the next update...

-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
  #17  
Old 26.04.2021, 16:04
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

Quote:
[ {
"enabled" : true,
"name" : "example rule for type REWRITE",
"pattern" : "(**External links are only visible to Support Staff**,
"rule" : "REWRITE",
"rewriteReplaceWith" : "$1#.jdeatme"
} ]
this one works fine here
__________________
JD-Dev & Server-Admin
Reply With Quote
  #18  
Old 26.04.2021, 17:11
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

Quote:
Originally Posted by Jiaz View Post
this one works fine here
Yes, this one rule is enough. it's good.
Reply With Quote
  #19  
Old 27.04.2021, 00:02
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

Everything worked fine, but I noticed the parser was not working for these links:
**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**



Does not perform a parsing activity

I tried to optimize the previous pattern, but there is an error in the ranges.
I had to go back to a different pattern again:

Code:
(hXXps://example\\.ru/(20[01][0-9]|202[0-2])/0*([1-9]|1[0-2])/(\\d+[-/]\\d+)|hXXps://example\\.ru/diary/(.*)/(\\d+)-(\\d+)-(\\d+))
New date 2000 - 2022

Parse Into Range:
2000 - 2019
2020 - 2022
Parse Into Block Regex:
20[01][0-9]
202[0-2]
Combining Into Regex Pattern:
(20[01][0-9]|202[0-2])

Last edited by Student im ersten Jahr; 27.04.2021 at 00:30.
Reply With Quote
  #20  
Old 27.04.2021, 12:18
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

You should try to keep pattern as simple as possible
__________________
JD-Dev & Server-Admin
Reply With Quote
  #21  
Old 09.05.2021, 11:23
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

While analyzing or copying links from the page, JD2 does not recognize the link properly, especially if the page includes e.g. such an html tag &nbsp; (At the end of the address)
**External links are only visible to Support Staff****External links are only visible to Support Staff**
%C2%A0 => &nbsp;
I want to ask - how can I solve this problem with better recognition of the correct link in JD2?

Example Source where there are additional links in the text:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
Reply With Quote
  #22  
Old 09.05.2021, 19:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

1.) That example link doesn't work in browser either, just shows
Quote:
Произведение не отображается
2.) optimize your pattern to just find what you are looking for
__________________
JD-Dev & Server-Admin
Reply With Quote
  #23  
Old 10.05.2021, 06:27
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

Try to match any protocol but wrong: The regular expression contains mismatched '(' and ')'.

\\b((?:[a-z][\\w-]+:(?:\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]/(20[01][0-9]|202[0-2])/0*([1-9]|1[0-2])/(\\d+[-/]\\d+)|\\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]/diary/(.*)/(\\d+)-(\\d+)-(\\d+))
Reply With Quote
  #24  
Old 10.05.2021, 16:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

Quote:
Originally Posted by Student im ersten Jahr View Post
Try to match any protocol but wrong: The regular expression contains mismatched '(' and ')'.

\\b((?:[a-z][\\w-]+:(?:\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]/(20[01][0-9]|202[0-2])/0*([1-9]|1[0-2])/(\\d+[-/]\\d+)|\\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]/diary/(.*)/(\\d+)-(\\d+)-(\\d+))
same error is shown in regex101, so no error with JDownloader
__________________
JD-Dev & Server-Admin
Reply With Quote
  #25  
Old 10.05.2021, 10:04
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

You only need to match protocol http and https. Links without protocol are NOT processed!
And you again overcomplicate your pattern!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #26  
Old 10.05.2021, 11:49
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

I have an even more elaborate regular expression that matches trillions of addresses all over the internet. But let's not go into this, it has to fit with equal protocols old and newer
http
https
and hxxp/.wwww

Even the most complex super-complex expression will be super fast, it all depends on the engine that the program uses. How do I use complicated regular expressions with infinite strings, and yet it still works, because the developer has allowed even billions of expressions to have more and more precise expressions, processing time is several hours, but it works (depending only on CPU power)

Last edited by Student im ersten Jahr; 10.05.2021 at 11:55.
Reply With Quote
  #27  
Old 10.05.2021, 13:10
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

Quote:
Originally Posted by Student im ersten Jahr View Post
because the developer has allowed even billions of expressions to have more and more precise expressions
...you clearly do not have billions of expressions...but nice try...if you would know how much time that many expressions would need....
__________________
JD-Dev & Server-Admin
Reply With Quote
  #28  
Old 10.05.2021, 13:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

You don't need that complex pattern because you are parsing a normal website and just want to look for URLs with specific pattern. Please learn regex by yourself!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #29  
Old 10.05.2021, 16:06
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

Other....

He's not cheating, it's all possible.
Infinite regex
Super developer address
ivg2003 (at) hotmail.com
Reply With Quote
  #30  
Old 10.05.2021, 15:58
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

Yutaka Emura
developer name )
**External links are only visible to Support Staff****External links are only visible to Support Staff**


It's an extremely fast tool, really, but for comparison, maybe the JD2 is not making up for the speed.
I add mine clearly on a regular basis and it works, if it doesn't work better in JD2 I report it problems. I don't know how to convert the sample and commented expressions because people tell me to report it to the JD2 developers. Really.

Last edited by Student im ersten Jahr; 10.05.2021 at 16:02.
Reply With Quote
  #31  
Old 10.05.2021, 16:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

Don't report to us if you have misstakes in your patterns! Please find/fix the issues by yourself!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #32  
Old 10.05.2021, 16:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

I never told he is cheating. I'm just saying that a billion expressions will take VERY LONG time.
Just to show you the math. Each expression just require 1 ms, this would end up to 11 days just to test every expression just once.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #33  
Old 10.05.2021, 16:14
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

People tell me that my regular expressions work, they are correct, I wonder why the programmers tell me: turn to the programmer JD2 ETC :(
Reply With Quote
  #34  
Old 10.05.2021, 16:21
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

Quote:
Originally Posted by Student im ersten Jahr View Post
People tell me that my regular expressions work, they are correct, I wonder why the programmers tell me: turn to the programmer JD2 ETC :(
Please show me the pattern where JDownloader states it is wrong but you think it is correct
You can verify them on regex101 AND don't forget to proper translate your pattern to java pattern, eg
docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#jcc
on regex101 you can change regex engine on the right
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 10.05.2021 at 16:25.
Reply With Quote
  #35  
Old 10.05.2021, 16:20
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

But not important, this post finished
Reply With Quote
  #36  
Old 10.05.2021, 16:24
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

I DON'T KNOW WHY, BUT MY REGULAR EXPRESSIONS WORK IN ONE SECOND, I CLICK FIND AND GET THE RESULT IN A SECOND, IT IS VERY WEIRD, HOW IS IT POSSIBLE? It was the Japanese who invented it - not me!

Edit:Not matter please close topic.

Last edited by Student im ersten Jahr; 10.05.2021 at 16:28.
Reply With Quote
  #37  
Old 10.05.2021, 16:26
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

So you have a billion expressions in your pattern? It's about several pages of text long? You know what a billion expressions does mean?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #38  
Old 10.05.2021, 18:30
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

There is definitely an error because I changed \ to \\ Everyone tells me double use is dumb and stupid and try to avoid it.
Reply With Quote
  #39  
Old 10.05.2021, 19:33
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 80,975
Default

@Student im ersten Jahr:
When you place that pattern into JSON, you have to take care of correct encoding.
Pattern, JSON Encoding, those are two different things!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #40  
Old 11.05.2021, 08:55
Student im ersten Jahr Student im ersten Jahr is offline
Black Hole
 
Join Date: Nov 2020
Posts: 291
Default

This is not easy, because I see thousands of asking all over the Internet:

Example:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
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 19:24.
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.