Yincognito wrote: ↑June 10th, 2020, 12:40 pm
Really?
I'm not, I'm getting V3, just checked it out using the
Debug=2 option.
That being said, it looks like my system of getting the data irrespective of version, field names or their order in the JSON might be useful, after all - if the issue persists, that is.
Let me know if you or anyone is interested. And yes, it can be adapted to be used in modular .inc files (jsmorley's type), as it is variable based anyway.
P.S. By the way, I'm not using any user agent at all. Must have forgot to include it, as I did want to follow your trick by having a mobile user agent, after all...
I'm hesitant to jump to an approach that is that complicated. While it might work just fine, and for 90% of users they are never going to look at how the sausage is made anyway, I do fear that if there is some minor change to the JSON, one that breaks both my stuff and yours, a much more complicated RegExp is going to be really hard for anyone but the most determined person to fix.
What would be nice at some point, is something, probably a plugin, that could take a dump of the site from WebParser, and extract just the JSON from it, formatting it into a text file with all the line breaks and indenting and all that, so it becomes MUCH more readable. Then use some JSON "reader" functionality to get fields by name, so it wouldn't matter about any "order" or other extraneous "formatting" in the original source. I guess my point is that this is JSON, although embedded in HTML in a weird and ugly way, and JSON is JSON. "Parsing" JSON like any other text file sorta defeats the purpose.
In any case, I refuse to accept that they are going to continue to maintain both V2 and V3 going forward. I certainly refuse to accept that this can just be random and arbitrary. My guess is that this is an IBM Company, running on the IBM Cloud, and they are having some issues with how they are "balancing" between servers as they roll out the final (for now) V3 version of this. It's fine for me today, and hopefully will continue to be so. This may not be a problem with weather.com at all, but rather a problem with IBM. I haven't trusted Big Blue since the OS/2 days. Any company that stands there staring while Bill Gates picks their pockets not once, but twice in 20 years is not really on top of their game.