Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Web-scraping/Liberty-BASIC/web-scraping.basic
Normal file
23
Task/Web-scraping/Liberty-BASIC/web-scraping.basic
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
if DownloadToFile("http://tycho.usno.navy.mil/cgi-bin/timer.pl", DefaultDir$ + "\timer.htm") = 0 then
|
||||
open DefaultDir$ + "\timer.htm" for input as #f
|
||||
html$ = lower$(input$(#f, LOF(#f)))
|
||||
close #f
|
||||
|
||||
a= instr( html$, "utc" )-1
|
||||
print "UTC";mid$( html$, a-9,9)
|
||||
|
||||
end if
|
||||
|
||||
end
|
||||
|
||||
function DownloadToFile(urlfile$, localfile$)
|
||||
open "URLmon" for dll as #url
|
||||
calldll #url, "URLDownloadToFileA",_
|
||||
0 as long,_ 'null
|
||||
urlfile$ as ptr,_ 'url to download
|
||||
localfile$ as ptr,_ 'save file name
|
||||
0 as long,_ 'reserved, must be 0
|
||||
0 as long,_ 'callback address, can be 0
|
||||
DownloadToFile as ulong '0=success
|
||||
close #url
|
||||
end function
|
||||
Loading…
Add table
Add a link
Reference in a new issue