简体   繁体   中英

Powershell script for downloading files going corrupt

I am trying something very simple. Downloading a file and moving it to a specific folder. With this script it downloads the files and moves it correctly, but all the files I download this way are corrupt. What am I doing wrong? I've tried different source urls, these didnt make a difference.

# Source URL
$url = "https://easyupload.io/wbpkvq" 
# Destation file
$dest = "D:\Temp\trololol.mp3"
# Download the file
Invoke-WebRequest -Uri $url -OutFile $dest

This website prevents 'abuses' of the type you're trying to do: automated downloads. You could try something like AHK or Selenium if you really want to automate a single click. But those solutions tend to rot quickly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM