ontop Home News Contact Library US Weather Radar

Posted on 4/28/23

Our system for getting radar images explained. So the way we get our requests to the iembot is through a GET request to the JSON webpage of botstalk (https://weather.im/iembot-json/room/botstalk?seqnum=${lastNumber}). From this we parse our json responses, iterate a forEach loop to go through the messages, and parse the hrefs out of the contents. After we go through the contents and see if it includes our criteria to tweet/send to discord. Then check the UNPARSED response data to get the href link, go to that link, parse for the meta:image tag. Get that link and download the file if it is a png, and that is our image. dumb idiot way of doing it but it works. code wont be public for a long time as i am insecure abt my code