New Feature: Pull data from webpages

25 views
Skip to first unread message

Ian Clarke

unread,
Feb 4, 2012, 8:30:25 PM2/4/12
to last...@googlegroups.com
Take a look at this: http://lastcalc.com/FRjfV9F9

It demonstrates how LastCalc can now retrieve information from webpages.  Several new functions are introduced:

retrieve "http://blah.com"

This retrieves the web page, which is displayed as <html> title ... </html>

select "td.right" from page

This allows you to grab HTML element(s) from the page using a JQuery-style selector, they are returned as a list of elements if there are more than one, or just the element itself if there is only one.

get text from element

Grabs the textual content of the element.

interpret valAsText

This causes LastCalc to interpret text, rather than just treating it as a string in quotes.  In this example it converts the text to be a number, which you can see because it loses the ""s and is displayed in blue.

The rest is all stuff explained in the documentation.

Let me know if you have any comments/questions/suggestions.

Ian. 

--
Ian Clarke
Reply all
Reply to author
Forward
0 new messages