JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 15.03.2023, 09:06
wanko wanko is offline
JD VIP
 
Join Date: Aug 2015
Posts: 300
Default Set filename in crawler rule

packageNamePattern in crawler rule worked, but i need to go to packagizer and manual set filename to packagename, else it will stay video.mp4

when i selected multiple package in LinkGrabber and merged into one package, it just also renamed filename as well as package name

so it's there any ways to set filename in crawler rule ?

thank

Last edited by wanko; 15.03.2023 at 14:55.
Reply With Quote
  #2  
Old 20.03.2023, 12:28
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Please provide more information:
- The used LinkCrawler rule(s)
- Screenshots of your settings
- Example URLs
- A screen capture of the current behavior and an explanation of what would be your preferred behavior
__________________
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 22.03.2023, 06:40
wanko wanko is offline
JD VIP
 
Join Date: Aug 2015
Posts: 300
Default

oh nvm i just need add it into Downloads tab and then merged package together, so filename stay intact.

Now i have this worked crawler rule, but i don't know how to trim
**External links are only visible to Support Staff****External links are only visible to Support Staff**-scaled.jpg



**External links are only visible to Support Staff****External links are only visible to Support Staff**


{
"deepPattern" : "class="o-image" src="(https?://[^"]+.jpg)"|<img(.*) src="(https?://[^"]+.jpg)"",
"formPattern" : null,
"id" : 16454759668282,
"maxDecryptDepth" : 1,
"name" : "toyokoku,
"packageNamePattern" : "<title>(.+?)</title>",
"passwordPattern" : null,
"pattern" : "https?://toyokoku\\.com.au/product/.+",
"rewriteReplaceWith" : null,
"rule" : "DEEPDECRYPT",
"enabled" : true,
"logging" : false,
"updateCookies" : true
}

Last edited by wanko; 22.03.2023 at 06:42.
Reply With Quote
  #4  
Old 22.03.2023, 11:16
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

So now you got a different problem/question?
You want to remove the "-scaled" from that URL using a REWRITE rule(?)
__________________
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
  #5  
Old 22.03.2023, 15:10
wanko wanko is offline
JD VIP
 
Join Date: Aug 2015
Posts: 300
Default

yes, please, thank you

and if i'm remember

"deepPattern" : "class="o-image" src="(https?://[^"]+.jpg)"

this is useless right ? or i just write it in wrong format

Last edited by wanko; 22.03.2023 at 17:01.
Reply With Quote
  #6  
Old 23.03.2023, 13:53
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Either grab the correct item right away or use another rule of type REWRITE to change such URLs.
Example rule:
Code:
[
  {
    "enabled": true,
    "name": "example rule remove '-scaled' from 'cdn.toyokoku.com.au' URLs",
    "pattern": "(https?://cdn\\.toyokoku\\.com\\.au/.+)-scaled\\.jpg",
    "rule": "REWRITE",
    "rewriteReplaceWith": "$1.jpg"
  }
]
Rule as plaintext:
pastebin.com/raw/aRhHMzxD
__________________
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?

Last edited by pspzockerscene; 23.03.2023 at 13:53. Reason: Fixed typo
Reply With Quote
  #7  
Old 23.03.2023, 22:44
wanko wanko is offline
JD VIP
 
Join Date: Aug 2015
Posts: 300
Default

oh so each () is group, use group to match and trim
Reply With Quote
  #8  
Old 24.03.2023, 11:28
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,918
Default

Well yes this is how regular expressions work.
You can use webtool like regex101.com to test/learn RegEx.
__________________
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 14:02.
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.