Web Scraping with AutoHotkey 101.5-Returning InnerTEXT, Value, OuterHTML

Web Scraping with AutoHotkeyAutoHotkey Merchandise-White Stress ballThis is a quick review of getting text from a page using Web Scraping with AutoHotkey.   Often people new to Web Scraping will get hung-up on a minor detail wasting a lot of time.  This video helps point out a few of the common issues like not having a valid pointer and returning the wrong attributes.  Here is a link to the iWB2 Learner tool (remember it only works with IE.  If you’re beyond this video you might also check out this one dealing with troubleshooting.

Below is the code I review in the video

 
pwb := WBGet()
MsgBox % IsObject(pwb)
MsgBox % pwb.LocationURL
MsgBox % Var:=pwb.document.GetElementsByTagName("Input")[0].Value ;Get value
MsgBox % Var:=pwb.document.GetElementsByTagName("LI")[5].Value ;Don't use this- it doesn't pull back anything helpfu
MsgBox % Var:=pwb.document.GetElementsByTagName("LI")[5].OuterHTML ;Get InnerText
MsgBox % Var:=pwb.document.GetElementsByTagName("LI")[5].InnerHTML ;Get InnerHTML
MsgBox % Var:=pwb.document.GetElementsByTagName("LI")[5].OuterHTML ;Get OuterHTML

Web Scraping with AutoHotkey video overview- Returning the correct content