ERROR: HTTP/1.1 403 Forbidden in Downloads.jl

Viewed 60

I'm trying to download a .xlsx file using Julia by Downloads.jl like this, But I get an error:

julia> using Downloads: download

julia> file = download("http://www.tsetmc.com/tsev2/excel/IntraDayPrice.aspx?i=35425587644337450&m=30")
ERROR: HTTP/1.1 403 Forbidden while requesting http://www.tsetmc.com/tsev2/excel/IntraDayPrice.aspx?i=35425587644337450&m=30
Stacktrace:
 [1] #3
   @ C:\Users\Shayan\.julia\juliaup\julia-1.8.0+0.x64\share\julia\stdlib\v1.8\Downloads\src\Downloads.jl:243 [inlined]
 [2] arg_write(f::Downloads.var"#3#4"{Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Nothing, String}, arg::Nothing)
   @ ArgTools C:\Users\Shayan\.julia\juliaup\julia-1.8.0+0.x64\share\julia\stdlib\v1.8\ArgTools\src\ArgTools.jl:123
 [3] #download#2
   @ C:\Users\Shayan\.julia\juliaup\julia-1.8.0+0.x64\share\julia\stdlib\v1.8\Downloads\src\Downloads.jl:230 [inlined]
 [4] download (repeats 2 times)
   @ C:\Users\Shayan\.julia\juliaup\julia-1.8.0+0.x64\share\julia\stdlib\v1.8\Downloads\src\Downloads.jl:219 [inlined]
 [5] top-level scope
   @ REPL[8]:1

I don't know where the problem is. Any help would be appreciated.

0 Answers
Related