July 17th, 2017, 08:41 PM | #51 |
Member
Join Date: Jan 2013
Posts: 64
Thanks: 2,030
Thanked 615 Times in 63 Posts
|
Before I edit my host file with this information, are there any cons or trade-offs to doing so, or should it provide only improvements?
|
The Following 5 Users Say Thank You to beechcott For This Useful Post: |
July 18th, 2017, 04:58 AM | #52 | |
Vintage Idiot
Join Date: Feb 2012
Location: History
Posts: 22,135
Thanks: 226,717
Thanked 356,751 Times in 21,630 Posts
|
Quote:
a) Keep a copy of anything you're about to replace. b) Keep a copy of anything you're about to edit in. Have you tested a) to demonstrate that it's not working? Have you tested b) to demonstrate that it works/works better? Testing can be... um, testing, due to the usual requirement for rigour. Be aware that the next time you auto-update IHG's hostfile from their server it will likely replace most/all manual edits you've made with whatever IHG has decided to support/implement. |
|
The Following 6 Users Say Thank You to effCup For This Useful Post: |
July 18th, 2017, 07:09 AM | #53 | ||
Member
Join Date: Jan 2013
Posts: 64
Thanks: 2,030
Thanked 615 Times in 63 Posts
|
Quote:
I tried downloading from hotflick, and ImageHost Grabber said that it didn't find any images that it could download. I then edited the hostfile with the information from anw's post, to no avail. It still can't find any images. Quote:
|
||
The Following 5 Users Say Thank You to beechcott For This Useful Post: |
July 18th, 2017, 08:23 AM | #54 | |
NotTheDroidURLookingFor
Join Date: Oct 2010
Posts: 6,179
Thanks: 37,036
Thanked 141,149 Times in 6,174 Posts
|
Quote:
__________________
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. |
|
The Following 6 Users Say Thank You to berangus For This Useful Post: |
July 18th, 2017, 11:16 AM | #55 | |
Vintage Idiot
Join Date: Feb 2012
Location: History
Posts: 22,135
Thanks: 226,717
Thanked 356,751 Times in 21,630 Posts
|
Quote:
Try this instead: Host Label: pixxxels URL Pattern: ^https?:\/\/(?:s\d+\.)?pixxxels\.org\/image\/.+$ Search Pattern: Code:
function(pageData, pageUrl) { var iUrl = pageData.match(/id=('|")main-image\1 src=('|")(https?:\/\/s\d+\.pixxxels\.org\/.+?\.jpg)\2/); return iUrl ? {imgUrl: iUrl[3] + "?dl=1", status: "OK"} : {imgUrl: null, status: "ABORT"} } |
|
The Following 7 Users Say Thank You to effCup For This Useful Post: |
July 18th, 2017, 11:46 AM | #56 |
Vintage Idiot
Join Date: Feb 2012
Location: History
Posts: 22,135
Thanks: 226,717
Thanked 356,751 Times in 21,630 Posts
|
A slight change to groups in P&H:
Host Label: pimpandhost URL Pattern: ^https?:\/\/(?:image\.|www\.)?pimpandhost\.com\/image\/.+?$ Search Pattern: Code:
function(pageData, pageUrl) { var iUrl = pageData.match(/img class=('|")normal\1 src=('|")(https?:\/\/.+?)(_l)?(\.(gif|jpe?g|png|GIF|JPE?G|PNG))\2/); return iUrl ? {imgUrl: iUrl[3] + iUrl[5], status: "OK"} : {imgUrl: null, status: "ABORT"} } edit: but this seems a much more robust approach, as it avoids messing with image filetypes/dot-suffixes. Host Label: pimpandhost URL Pattern: ^https?:\/\/(?:image\.|www\.)?pimpandhost\.com\/image\/.+?$ Search Pattern: Code:
function(pageData, pageUrl) { if (!pageUrl.match(/\?size=original/)) { pageUrl += "?size=original"; } var req = new XMLHttpRequest(); req.open("GET", pageUrl, false); req.send(); var iUrl = (req.responseText).match(/img class=('|")original\1 src=('|")(https?:\/\/.+?)\2/); return iUrl ? {imgUrl: iUrl[3], status: "OK"} : {imgUrl: null, status: "ABORT"} } Last edited by effCup; July 18th, 2017 at 02:04 PM.. Reason: but |
The Following 6 Users Say Thank You to effCup For This Useful Post: |
July 18th, 2017, 02:41 PM | #57 |
Vintage Idiot
Join Date: Feb 2012
Location: History
Posts: 22,135
Thanks: 226,717
Thanked 356,751 Times in 21,630 Posts
|
OK, this works not only with the new P&H link format but also with the old format, many of which links still remain. Some examples here.
Host Label: pimpandhost URL Pattern: ^https?:\/\/(?:image\.|www\.)?pimpandhost\.com\/image\/.+?$ Code:
function(pageData, pageUrl) { if (pageUrl.match(/-original\.html$/)) { pageUrl = pageUrl.match(/https?:\/\/(?:image\.|www\.)?pimpandhost\.com\/image\/\d+/) + "?size=original"; } else if (!pageUrl.match(/\?size=original/)) { pageUrl += "?size=original"; } var req = new XMLHttpRequest(); req.open("GET", pageUrl, false); req.send(); var iUrl = (req.responseText).match(/img class=('|")original\1 src=('|")(https?:\/\/.+?)\2/); return iUrl ? {imgUrl: iUrl[3], status: "OK"} : {imgUrl: null, status: "ABORT"} } Last edited by effCup; July 19th, 2017 at 01:16 AM.. Reason: e.g. |
The Following 5 Users Say Thank You to effCup For This Useful Post: |
July 18th, 2017, 04:36 PM | #58 | ||
Member
Join Date: Jan 2013
Posts: 64
Thanks: 2,030
Thanked 615 Times in 63 Posts
|
Quote:
Quote:
|
||
The Following 4 Users Say Thank You to beechcott For This Useful Post: |
July 19th, 2017, 01:22 AM | #59 | |
Vintage Idiot
Join Date: Feb 2012
Location: History
Posts: 22,135
Thanks: 226,717
Thanked 356,751 Times in 21,630 Posts
|
Quote:
Host Label: pimpandhost URL Pattern: ^https?:\/\/(?:image\.|www\.)?pimpandhost\.com\/image\/.+?$ Search Pattern: Code:
function(pageData, pageUrl) { if (pageUrl.match(/-(original|medium)\.html$/)) { pageUrl = pageUrl.match(/https?:\/\/(?:image\.|www\.)?pimpandhost\.com\/image\/\d+/) + "?size=original"; } else if (!pageUrl.match(/\?size=original/)) { pageUrl += "?size=original"; } var req = new XMLHttpRequest(); req.open("GET", pageUrl, false); req.send(); var iUrl = (req.responseText).match(/img class=('|")original\1 src=('|")(https?:\/\/.+?)\2/); return iUrl ? {imgUrl: iUrl[3], status: "OK"} : {imgUrl: null, status: "ABORT"} } The old type of P&H link could be assigned to various views. So far we've got/have found "original" & "medium". I wonder if there were any others, maybe "small" or similar? Please let me know if you find any further such. |
|
The Following 7 Users Say Thank You to effCup For This Useful Post: |
July 19th, 2017, 05:13 AM | #60 | |
Vintage Idiot
Join Date: Feb 2012
Location: History
Posts: 22,135
Thanks: 226,717
Thanked 356,751 Times in 21,630 Posts
|
Quote:
I don't know why you got the failure. One possibility, but I'm not saying it was the cause, may be that the host was temporarily non-responsive when you tested. That is: the "failure" may have simply looked like such. /shrug/ But I'm open to it being due to something else. Tests here have passed, using the optional single- or double-quote formulation I wrote. |
|
The Following 5 Users Say Thank You to effCup For This Useful Post: |
|
|