Thanks.
The reason I left out the https prefix is that your first post left it out, and I figured since I'm doing a search and replace, it doesn't matter, the part being replaced comes after.
I didn't know about the logs, thanks, I thought maybe with logging set to false, it wouldn't log anything. There's a mess of logs there, but can't make much sense of them.
And yes I used regex101 and jsoneditoronline based on my previous search of the forum which mentioned them. I based my rules on the sample rules in the docs. My main confusion is with the double escapes, since the sample shows to use them, but regex101 set to use Java8 regex requires only one, except for the \\? as noted, which I found confusing. Hence I left out escaping the full stops altogether, since in regex it will match a full stop as well. In your version, it is mixed, with double-quotes using one escape, everything else 2.
The main difference I see is the added https prefix, including the ismobile variable, and added [^"]+ to match all the Amazon variables at the end.
Tested code:
Code:
[{
"enabled" : true,
"logging" : false,
"maxDecryptDepth" : 1,
"name" : "DPReview sample gallery",
"pattern" : "**External links are only visible to Support Staff**,
"packageNamePattern": "false,\"title\":\"([^\"]+)",
"rule" : "DEEPDECRYPT",
"passwordPattern" : null,
"deepPattern" : "(**External links are only visible to Support Staff**]+)"
}]
First test with only that one rule and fed a preformatted galleryID link: It correctly grabs all the jpgs in the gallery, even puts it into a folder named after the gallery, as per the 'packageNamePattern'. Not working: For some reason, it hasn't grabbed the Raws from the page, which has links matching the same pattern. Regex101 concurs it should work.
Adding the first rule reformatting from the page link to the API json link fails, grabbing all useless links.
That's all I have time for tonight. More testing tomorrow. But glad I made _some_ progress.
Not sure if I need to restart JD2 to reload the changed rules.
Edit: I tried another link, a Canon R8 gallery with jpg and CR3. This time it is grabbing both links correctly. Curiously, they are not named as in the json file (10-digit number +lowercase .cr3), but their original IMG_[frame].CR3 so Amazon is doing something funky.