Web scraping: Difference between revisions

Content added Content deleted
No edit summary
Line 1,214: Line 1,214:
}
}
}</lang>
}</lang>



=={{header|Microsoft Small Basic}}==
<lang Microsoft Small Basic>
'Entered by AykayayCiti -- Earl L. Montgomery
url_name = "http://tycho.usno.navy.mil/cgi-bin/timer.pl"
url_data = Network.GetWebPageContents(url_name)
find = "UTC"
' the length from the UTC to the time is -18 so we need
' to subtract from the UTC position
pos = Text.GetIndexOf(url_data,find)-18
result = Text.GetSubText(url_data,pos,(18+3)) 'plus 3 to add the UTC
TextWindow.WriteLine(result)

'you can eleminate a line of code by putting the
' GetIndexOf insde the GetSubText
'result2 = Text.GetSubText(url_data,Text.GetIndexOf(url_data,find)-18,(18+3))
'TextWindow.WriteLine(result2)</lang>
{{out}}
<pre>
Mar. 19, 04:19:34 UTC
Press any key to continue...
</pre>








=={{header|NetRexx}}==
=={{header|NetRexx}}==
Line 1,695: Line 1,725:
Oct. 27, 00:20:50 UTC
Oct. 27, 00:20:50 UTC
</pre>
</pre>



=={{header|Tcl}}==
=={{header|Tcl}}==