Sign in to follow this  
mike72

HTTP.get() to retrieve html.

Recommended Posts

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">°&#8200;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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this