Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Download Image from Internet
#1
Guys, can you please help me to adapt the code below to download the image?

For some reason it is not working for this link in particular.


Code:
Copy      Help
;allow single instance
if(getopt(nthreads)>1) end "The thread is already running. You can end it in the 'Running items' pane."

str sf_001 sd_001 ;;variables

download image data into variable sd
int downloaded_001
rep 60 ;;repeat max 10 minutes every 10 s until success
    IntGetFile "https://www.tropicaltidbits.com/analysis/models/eps/2024111206/eps_apcpn_us_23.png" sd_001
    err 10; continue ;;if error, retry after 10 s
    downloaded_001=1
    break
if(!downloaded_001) end "failed to download"

format filename and save to file
sf_001.timeformat("C:\TEMP\teste.png")
sd_001.setfile(sf_001)
out "done"
#2
It's not the code its the server. It's giving a 403 forbidden response.


Forum Jump:


Users browsing this thread: 1 Guest(s)