mike72 Posted September 12, 2018 Share Posted September 12, 2018 hello. Is it possible to retrieve HTML code from the HTTP.get() function? I am trying to get weather data that is on a HTML page, not an XML. no matter what i do, i cant seem to get the data out of that page. the string i want to retrieve from that page is : <span id="current-temp-value">19</span><span class="current-temp__unit" id="current-temp-unit">° C</span> from the weather sample, i am using : l1 = find(response, "< + span + id=" + tag + ">",0), and every other possibility between the "". the error i get is C1000, channel not found. Could you please tell me where i am going wrong. thanks Mike Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted September 12, 2018 Share Posted September 12, 2018 Certainly. But given your error message, you probably have a typo somewhere. Any chance you can post you script? Feel free to X out the URL or anything else you don't want to share. Quote Link to comment Share on other sites More sharing options...
mike72 Posted September 12, 2018 Author Share Posted September 12, 2018 thanks so much for the quick response, most appreciated. ill attach the .ctl, hopefully you can see where i made a mistake. thanks mike weatherTEST.ctl Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted September 12, 2018 Share Posted September 12, 2018 1) you have a comment in line 39 that isn't marked as a comment. Its outside functions in the class, but still will have unpredictable behavior. 2) for some reason you commented out l2 at line 42. Then you go on to use l2 in line 45 and 46. This may be where you are getting the C1000 error since l2 never exists. Quote Link to comment Share on other sites More sharing options...
mike72 Posted September 12, 2018 Author Share Posted September 12, 2018 thank you so much for pointing me in the right direction. i shall change the code. mike Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.