Quote:
Originally Posted by effCup
No, the URL Pattern already accommodates both http & https. Thanks very much for those two direct image links as that was very helpful in exposing an aspect of the site's behaviour.
This worked for me; passed all tests from posts here.
Host Label: pixxxels
URL Pattern: ^https?:\/\/(?:s\d+\.)?pixxxels\.org\/image\/.+$
Search Pattern:
Code:
function(pageData, pageUrl) {
var iUrl = pageData.match(/src=('|")(https?:\/\/s\d+\.pixxxels\.org\/.+?\.jpg)\1/);
return iUrl ? {imgUrl: iUrl[2] + "?dl=1", status: "OK"} : {imgUrl: null, status: "ABORT"}
}
|
Super, glad I could help out! Big thanks for this new code, it works aces although it required a tiny fix - guess I know a little about this stuff after all.
In the first line of the function there's a single quotation where it should be a double: src=("|") instead of src=('|"). So the whole thing becomes thus:
Host Label: pixxxels
URL Pattern: ^https?:\/\/(?:s\d+\.)?pixxxels\.org\/image\/.+$
Search Pattern:
Code:
function(pageData, pageUrl) {
var iUrl = pageData.match(/src=("|")(https?:\/\/s\d+\.pixxxels\.org\/.+?\.jpg)\1/);
return iUrl ? {imgUrl: iUrl[2] + "?dl=1", status: "OK"} : {imgUrl: null, status: "ABORT"}
}
Now it sucks away like Sasha Grey!