Web scraping: Difference between revisions
Content added Content deleted
Line 981: | Line 981: | ||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
I'm using the <code>Requests.jl</code> package for this solution. Note, I used a slightly different URL after finding that the one specified in the task description is deprecated (though it still works). |
I'm using the <code>Requests.jl</code> package for this solution. Note, I used a slightly different URL after finding that the one specified in the task description is deprecated (though it still works). |
||
<lang Julia> |
<lang Julia>using Requests |
||
using Requests |
|||
function getusnotime() |
function getusnotime() |
||
Line 1,000: | Line 999: | ||
if issuccess |
if issuccess |
||
println("The USNO time is ", t |
println("The USNO time is ", t) |
||
else |
else |
||
println("Failed to fetch UNSO time:\n", t) |
println("Failed to fetch UNSO time:\n", t) |