Quote:
Originally Posted by effCup
Pimp & host:
Host Label: pimpandhost
URL Pattern: ^https?:\/\/(?:image\.|www\.)?pimpandhost\.com\/image\/.+?$
Code:
function(pageData, pageUrl) {
var iUrl = pageData.match(/img class="normal" src="(https?:\/\/.+?)(_l)?(\.(jpe?g|png|JPE?G|PNG))"/);
return iUrl ? {imgUrl: iUrl[1] + iUrl[3], status: "OK"} : {imgUrl: null, status: "ABORT"}
}
edit: to explain the above: the purpose is to get the full-size image from P&H, rather than the reduced-size image that is often what's first linked.
edit 2: doesn't currently work for gifs but would be easy to amend to include. Does P&H take gifs? It's a poor option to have to wrangle with the image file suffix but that's pretty helpful for locating the "_l" that we want to remove in order to get the full-size image, so: swings/seesaws.
If people need this for gifs on P&H then let me know.
|
Thanks for your effort, but in my case this recipe didn't work - P&H keeps sending back miniatures, thumbnails. Win10 x64, Palemoon 27.3.0 (x64), IHG hostfile version 5/20/17. P&H isn't blocked in my country.