OK, I get that, but...
it seems like you're dealing with a small fixed set (half dozen or so?) of images. Why not just download them once from the website, import them into the stack and store them on a separate card, size them (or not) and just set the imagesource of the char when desired? That's been my approach when I need to do similar tasks.
Also... my experience in an earlier life scraping web sites is that both the content and format of web pages changes much more often than I'd like, and then I'd have to go through the process not just of updating my code, but of painfully examining the page source of the original page to see what changed and what I'd need to do to get at the new data. If there's an api to work with it's gonna be much more stable because the folks who are putting the web pages together are gonna need it that way as well. Registering for an api key with weather underground is free - I use it to display current weather on osmc running on a raspberry pi.
ImageSource vs. <img src="your image"> ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: ImageSource vs. <img src="your image"> ?
Perfectly legit way to go, but the main reason I am not doing that (in this or any other app I write) is two fold-mwieder wrote: ↑Tue May 11, 2021 4:25 pmit seems like you're dealing with a small fixed set (half dozen or so?) of images. Why not just download them once from the website, import them into the stack and store them on a separate card, size them (or not) and just set the imagesource of the char when desired?
1. size - while these pictures are relatively small, weighing in anywhere from 3 to 15kb, if I decide to use larger images, the size of the stack would grow quite quickly.
2. the number of pictures involved - as far as I can tell, there is an image for not only every day / night of the week, but also for every situation that might come up. Sunday, for instance, looks like this...
Monday ...
I took the easy way out here, of the methods I tested, downloading them to the folder took no time at all compared to, as I mentioned earlier, putting them directly into an image object. Now, I might not have the most efficient code rolling, that is true, but out of what I can do, just downloading and popping them in is the easiest / fastest so far by enough, and whatever comes down replaces whatever was in the folder, so the size issue is no issue at all, at least while using imageSource.
I already agree for anyone else, or even myself, using the API would be easier heh, and NOAA already has a free use for registration API, I just don't feel like registering for any of them, and as I said, I wanted to experiment with scraping. So far, the target lines I've picked out seem to be pretty stable, but if they change I doubt it would be that painstaking to pick them out again, FF makes it quite easy indeedAlso... my experience in an earlier life scraping web sites is that both the content and format of web pages changes much more often than I'd like, and then I'd have to go through the process not just of updating my code, but of painfully examining the page source of the original page to see what changed and what I'd need to do to get at the new data. If there's an api to work with it's gonna be much more stable because the folks who are putting the web pages together are gonna need it that way as well. Registering for an api key with weather underground is free - I use it to display current weather on osmc running on a raspberry pi.