Author Topic: NWS Marine Coastal forecasts in plain text  (Read 1665 times)

0 Members and 1 Guest are viewing this topic.

Offline lobsterman

  • Senior Contributor
  • ****
  • Posts: 164
    • Cape Small Harbor Weather
NWS Marine Coastal forecasts in plain text
« on: August 02, 2018, 03:21:11 PM »
This URL https://forecast-v3.weather.gov/products/locations/GYX/CWF/1?format=text gives a series of local zone forecasts along the Maine coast. I have been trying to figure out how to get only a single one of those local zone in that same text format.

For example, is there a format to get only the ANZ153 section or do I just need to write some kind of regex parser to accomplish that?

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 724
    • Lake Huron Weather
Re: NWS Marine Coastal forecasts in plain text
« Reply #1 on: August 02, 2018, 03:57:57 PM »
Is this similar to what you are looking for?
https://forecast.weather.gov/shmrn.php?mz=anz153

I have a series of marine weather pages on my site that use this source - with the relevant zones for Great Lakes that is  :grin:




CW3699

Offline ocala

  • Forecaster
  • *****
  • Posts: 4383
Re: NWS Marine Coastal forecasts in plain text
« Reply #2 on: August 02, 2018, 05:13:47 PM »
Don't know if this will help but the NWS also has point marine forecasts.
Very useful if you are going to be in a specific area.
The blues had a baby and they named it Rock & Roll

Offline lobsterman

  • Senior Contributor
  • ****
  • Posts: 164
    • Cape Small Harbor Weather
Re: NWS Marine Coastal forecasts in plain text
« Reply #3 on: August 11, 2018, 12:06:21 PM »
Is this similar to what you are looking for?
https://forecast.weather.gov/shmrn.php?mz=anz153

I have a series of marine weather pages on my site that use this source - with the relevant zones for Great Lakes that is  :grin:

It is indeed, mostly, though that is still an HTML page. I was looking for a way to get plain text only, using curl or a similar tool.

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 724
    • Lake Huron Weather
Re: NWS Marine Coastal forecasts in plain text
« Reply #4 on: August 11, 2018, 01:29:11 PM »
Are you looking to have it on a web page within your site?  Similar to this?
https://lakehuronweather.org/wxMarineZoneLHZ347.php

If so, I can share the code I use for this.

Edit:  There is also a text only within a web page.
« Last Edit: August 11, 2018, 01:32:26 PM by Otis »

CW3699

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 724
    • Lake Huron Weather

CW3699

Offline SoMDWx

  • Forecaster
  • *****
  • Posts: 1014
    • Southern Maryland Weather
Re: NWS Marine Coastal forecasts in plain text
« Reply #6 on: August 11, 2018, 04:14:12 PM »
Otis,
  I would be interested in your script!  :grin:

Jim

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 724
    • Lake Huron Weather
Re: NWS Marine Coastal forecasts in plain text
« Reply #7 on: August 12, 2018, 11:10:22 AM »
Sent you a PM.

CW3699

Offline SoMDWx

  • Forecaster
  • *****
  • Posts: 1014
    • Southern Maryland Weather
Re: NWS Marine Coastal forecasts in plain text
« Reply #8 on: August 12, 2018, 01:02:31 PM »
Stupid me.. I deleted the wrong PM.... Please, if you wouldn't mind, send again?


Thanks!

Jim