It is currently March 29th, 2024, 7:31 am

Struggling with WebParser

Get help with creating, editing & fixing problems with skins
JTMote
Posts: 4
Joined: November 3rd, 2014, 1:14 am

Struggling with WebParser

Post by JTMote »

Hello! I'm trying to fetch an image from ftp://ftp.nnvl.noaa.gov/GOES/GER/ , specifically the most recently posted one (which is at the bottom of the table.

I'm using https://regex101.com/ to figure out if it's working, using a debug=2 dump of the html to test on. I get

Code: Select all

">(.*)<\/A>\n<\/PRE>\n<HR>\n<\/BODY>\n<\/HTML>
working there, but in RainRegExp and Rainmeter itself it's failing to work. I know next to nothing of RegExp and the different flavors of it, and have only barely stumbled this far, so if someone could point me in the right direction that would be amazing.

Thanks!
User avatar
Brian
Developer
Posts: 2674
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Struggling with WebParser

Post by Brian »

Although there is probably more elegant ways to do this, it looks like your close, and may be missing a carriage return.

Try this:

Code: Select all

[Website]
Measure=Plugin
Plugin=WebParser
URL="ftp://ftp.nnvl.noaa.gov/GOES/GER/"
RegExp=jpg\">(.*)<\/A>\r\n<\/PRE>

[DownloadedImage]
Measure=Plugin
Plugin=WebParser
URL="ftp://ftp.nnvl.noaa.gov/GOES/GER/[Website]"
StringIndex=1
Download=1

[MyImage]
Meter=Image
MeasureName=DownloadedImage
Probably need to scale the image down since those images are fairly big.

-Brian
JTMote
Posts: 4
Joined: November 3rd, 2014, 1:14 am

Re: Struggling with WebParser

Post by JTMote »

Brian wrote:Although there is probably more elegant ways to do this, it looks like your close, and may be missing a carriage return.

Try this:

Code: Select all

[Website]
Measure=Plugin
Plugin=WebParser
URL="ftp://ftp.nnvl.noaa.gov/GOES/GER/"
RegExp=jpg\">(.*)<\/A>\r\n<\/PRE>

[DownloadedImage]
Measure=Plugin
Plugin=WebParser
URL="ftp://ftp.nnvl.noaa.gov/GOES/GER/[Website]"
StringIndex=1
Download=1

[MyImage]
Meter=Image
MeasureName=DownloadedImage
Probably need to scale the image down since those images are fairly big.

-Brian
I'm trying to use it as a background, so it's about the right size, actually they might be too small. thanks though!