View Single Post
Old June 23rd, 2017, 09:19 AM   #23
Enot1964
Member
 
Enot1964's Avatar
 
Join Date: Dec 2007
Location: Mother Russia, Moscow
Posts: 27
Thanks: 166,712
Thanked 132 Times in 20 Posts
Enot1964 500+Enot1964 500+Enot1964 500+Enot1964 500+Enot1964 500+Enot1964 500+Enot1964 500+
Default

Quote:
Originally Posted by effCup View Post
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.
Enot1964 is offline   Reply With Quote
The Following 8 Users Say Thank You to Enot1964 For This Useful Post: