Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Last active June 3, 2016 04:35
Show Gist options
  • Save TLMcode/69876440a5f0c026eac2c9d849b5c9d9 to your computer and use it in GitHub Desktop.
Save TLMcode/69876440a5f0c026eac2c9d849b5c9d9 to your computer and use it in GitHub Desktop.
Foreign Language DOM Conversion
url = http://www.archiwum.wyborcza.pl/Archiwum/1,0,8137863,20160401RP-DGW,Amerykanska_czata_w_Polsce,.html
reqObj := ComObjCreate( "WinHttp.WinHttpRequest.5.1" )
reqObj.Open( "GET", url, false ), reqObj.Send()
htmObj := ComObjCreate( "HTMLfile" ), htmObj.Write( reqObj.ResponseText )
Elements := RegExReplace( htmObj.getElementById( "arM" ).innerHTML, "i)(</|<).*?>", "$1div>" )
htmObj.Close()
htmObj.Write( "<html><head></head><body>" Elements "</body></html>" )
msgbox % htmObj.getElementsByTagName( "div" )[ 3 ].innerText
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment