#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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. |
#4
|
||||
|
||||
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 |
#5
|
|||
|
|||
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. |
#6
|
||||
|
||||
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" } ] pastebin.com/raw/aRhHMzxD
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download Last edited by pspzockerscene; 23.03.2023 at 13:53. Reason: Fixed typo |
#7
|
|||
|
|||
oh so each () is group, use group to match and trim
|
#8
|
||||
|
||||
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 |
Thread Tools | |
Display Modes | |
|
|