Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^5: LWP::UserAgent Alternatives for API data

by johnfl68 (Scribe)
on Jul 07, 2020 at 23:23 UTC ( #11119014=note: print w/replies, xml ) Need Help??

in reply to Re^4: LWP::UserAgent Alternatives for API data
in thread LWP::UserAgent Alternatives for API data

When I started using the NWS API regularly about 2 months ago, the Current Obs were consistently coming back 4 or more hours old. The Current Obs are only supposed to be around an hour old at most.

The forecasts at the time were coming back 2-4 hour old, but the NWS says that is about correct for those, as they are not updated as often. I just got back data for one location that is 239 hours old (loads the same old date in web browser matching the server version). Another forecast location has been giving back 503 error since late last night (both browser and server).

For the Current Obs, instead of using (Station KMCO as example)

you would use

to get the data. If you do this from a browser, you will get a style sheet version, just use view source to see the pure XML.

There are some differences, but most of the basic information is the same. The XML data has been much more stable than the API versions.

Hope that helps.

  • Comment on Re^5: LWP::UserAgent Alternatives for API data

Replies are listed 'Best First'.
Re^6: LWP::UserAgent Alternatives for API data
by marto (Cardinal) on Jul 10, 2020 at 08:03 UTC

    Which tags are you looking to extract from the XML? Obviously the data return by this differs from that of the API.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11119014]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2021-03-03 16:03 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (82 votes). Check out past polls.