Original Post:Hello brilliant Rainmeter creators! My knowledge of Rainmeter is growing but I still cannot manage a bit of the WebParser despite having done the tutorial. I'll explain what my goal is and where I've hit a snag, and hopefully someone can unsnag me so I can continue (to the next snag).
Desired result: Display current Radar Map of a selected local area in a small, perhaps square, image.
I understand, I think, that the RegEx search parameters. I'm attempting to use two search terms to 'bookend' the data I want, then it will be logged as StringIndex 1, 2, 3 for use in later Meters. I might be misunderstanding what to look for but I can't for the life of me figure out where the image data I want is within the HTML. I see other things that refer to images like banner icons and buttons but when it comes to the map, it gets more vague.
I've gone a slightly different route but now I am attempting to inject the users local time into the RegEx to parse the last few frames of the radar data. Is there perhaps a simpler way to achieve this result? The process would be the same pulling Radar-only tiles because they are time-based as well. Anyway that's where I'm at so far. It's fun to learn!
Last edited by frshmrrw on September 19th, 2023, 3:43 pm, edited 4 times in total.
I generally don't know what I'm doing but I'm here to learn
frshmrrw wrote: ↑September 18th, 2023, 12:08 am
Hello brilliant Rainmeter creators! My knowledge of Rainmeter is growing but I still cannot manage a bit of the WebParser despite having done the tutorial. I'll explain what my goal is and where I've hit a snag, and hopefully someone can unsnag me so I can continue (to the next snag).
Desired result: Display current Radar Map of a selected local area in a small, perhaps square, image.
I understand, I think, that the RegEx search parameters. I'm attempting to use two search terms to 'bookend' the data I want, then it will be logged as StringIndex 1, 2, 3 for use in later Meters. I might be misunderstanding what to look for but I can't for the life of me figure out where the image data I want is within the HTML. I see other things that refer to images like banner icons and buttons but when it comes to the map, it gets more vague.
I can't test this since I'm on my phone now, but the image source of that radar might be hidden behind some javascript. Even so, while we could find this for you, usually this is your job. Don't be restricted to gifs or pngs, and expect the image to be broken into more pieces for easy loading. Right clicking and using Inspect to inspect elements on the page might help, as well as taking into account that the address itself might be broken into multiple pieces, for example leaving the root of the site out. It's a bit of finding the needle in a haystack and might require multiple steps to find out the original source, but ideally you would end up with something you can use. I might take a look at it from my laptop sometime tomorrow, but I can't guarantee the result.
Yincognito wrote: ↑September 18th, 2023, 8:41 pm
I can't test this since I'm on my phone now...[snipped].... but I can't guarantee the result.
I really appreciate your thoughts and even moreso your patience! Since I've posted I've learned a few things that seem to be helping but I'm still brain-borked on needle-hunting. I definitely don't want anyone looking for a needle for me because I'll learn a ton by trying to look. I'm just hoping to get some tips on looking for the things (which you've provided a few of). I have, however, concluded that the needle I'm looking for (some kind of image cache) will, of course, not be in the HTML source.
When I poke at other radar skins, they seem to be polling the API. So now I'm trying to learn how to do that because I believe what I am trying to do is, like you said, scripted elsewhere. I'm a very non-linear learner so I tend to miss key pieces of the learning process, hence not understanding what the API polling was initially.
I believe you've technically 'unsnagged me' by confirming I'm not looking in the right place. For now I'm learning API basics..
Thanks for reading!! Will update as I make progress (because it helps me persist).
I generally don't know what I'm doing but I'm here to learn
frshmrrw wrote: ↑September 18th, 2023, 8:54 pm
I really appreciate your thoughts and even moreso your patience! Since I've posted I've learned a few things that seem to be helping but I'm still brain-borked on needle-hunting. I definitely don't want anyone looking for a needle for me because I'll learn a ton by trying to look. I'm just hoping to get some tips on looking for the things (which you've provided a few of). I have, however, concluded that the needle I'm looking for (some kind of image cache) will, of course, not be in the HTML source.
When I poke at other radar skins, they seem to be polling the API. So now I'm trying to learn how to do that because I believe what I am trying to do is, like you said, scripted elsewhere. I'm a very non-linear learner so I tend to miss key pieces of the learning process, hence not understanding what the API polling was initially.
I believe you've technically 'unsnagged me' by confirming I'm not looking in the right place. For now I'm learning API basics..
Thanks for reading!! Will update as I make progress (because it helps me persist).
No problem, we all learn by looking after those needles...
Anyway, now since I got to my laptop, here's yet another trick you can use instead of looking through tons of text: using the Network tab in Chrome's Developer Tools (which is available once you right click and Inspect stuff on the page), reload the page and examing the resources used by the site. As you already figured out, the images have to do with the API, and, as already mentioned, are just chunks of the entire map (see the tooltip):
Radar.jpg
Once you find a way to get to the original images or determine the pattern by which they are named (they might be available as a single image, if you persist with the search for a convenient answer and you're lucky), they can easily be retrieved / downloaded by Rainmeter, and played as a sequence of frames in your skin.
You do not have the required permissions to view the files attached to this post.
I've learned a lot today and I appreciate your feedback. I am attempting to overlay the Transportation layer of the tile. I figure if I get this sorted the Radar layer should be similar.
Edit: It downloaded it!! But isn't displaying. I'll get this part..
edit2: it's displaying!! hurrah!
I believe I am officially unsnagged and can move on to the next snag. Thank you again!!!
I generally don't know what I'm doing but I'm here to learn
frshmrrw wrote: ↑September 19th, 2023, 12:05 am
Wow that is something I should have found by now! Thank you so much! Now I'm able to grab an image and display it.
FinishAction is an attempt to get it to move on and download the next image because I'm not sure why it isn't grabbing the next desired image. I've learned a lot today and I appreciate your feedback. I am attempting to overlay the Transportation layer of the tile. I figure if I get this sorted the Radar layer should be similar.
I commented out the FinishActions since if it works you don't absolutely need them in this case (you might need them in the future though, which is why I kept them in the code), but Download=1 and a proper ImagePath were missing from your code (ImagePath is again not absolutely needed, you can write the complete path in ImageName, it's just that it's comfortable to have in this particular scenario), which is why it didn't work earlier.
EDIT: Yep, that's the spirit - glad you figured this part on your own eventually! You're welcome for the rest, of course.
I think I can work through that Open-Book so to speak. I figure theres some kind of tile number that doesn't change for the desired location... Off to try to figure this one out.
I generally don't know what I'm doing but I'm here to learn
I think I can work through that Open-Book so to speak. I figure theres some kind of tile number that doesn't change for the desired location... Off to try to figure this one out.
Good luck with investingating that, and feel free to ask if you encounter another snag in the way. SetVariable should be easy to understand, just take your time, make sure you fully understand one thing and how it works before moving to the next one. I guess that you can either make as many measures to download the images as necessary (i.e. do stuff at the same time), or you can use SetVariable from another measure that runs first and command the webparsers to update while using the new value of the variables in the URLs (i.e. do stuff sequentially). Make sure you don't forget to add DynamicVariables=1 wherever you use changing variables.
Yincognito wrote: ↑September 19th, 2023, 12:50 am
Good luck with investingating that, and feel free to ask if you encounter another snag in the way. SetVariable should be easy to understand, just take your time, make sure you fully understand one thing and how it works before moving to the next one. I guess that you can either make as many measures to download the images as necessary (i.e. do stuff at the same time), or you can use SetVariable from another measure that runs first and command the webparsers to update while using the new value of the variables in the URLs (i.e. do stuff sequentially). Make sure you don't forget to add DynamicVariables=1 wherever you use changing variables.
I appreciate your wisdom! Good thoughts here to keep me from trying to bite off too much. Thanks again for your patience I get nervous interacting with the internet, sometimes; it's nice that this community is so helpful to total noobs.
I generally don't know what I'm doing but I'm here to learn
I apologize if double posting is frowned upon around here. If it should be a new post I'll do so.
Removed bit referring to URL variables as I'm using a different data source
This is where I'm at, now. I think I am stuck the fact that polling the current time won't match the on-the-hour/every6minutes that the source site uses. But maybe I've borked my RegEx. I'm trying to request the name of the image according to it's date in the URL. I could just pull the last frame for a single image of 'most recent radar image'. But if I'm going to be satisfied I'll want to pull the last few frames and use gif2frames to turn it into an animated display. If I'm way off track here do let me know, anyone reading!