How would I write a script to download files from this site. Is it possible to supply the login and password with the url?
http://feeds.itunes.apple.com/feeds/epf/
Would I format the url like this?
WebClient Client = new WebClient();
Client.DownloadFile("http://feeds.itunes.apple.com/feeds/epf/v3/full/current/itunes20110511.tbz.md5?username=myusername&password=mypassword", @"C:\folder\file.md5");
Yes, just set the WebClient's
Credentials
property to a NetworkCredentials
instance with the username/password. For example:
Client.Credentials = new System.Net.NetworkCredential("john", "password1234!");
Use WebClient.Credentials property to supply your credentials to the web site:
using (WebClient client = new WebClient()) {
client.Credentials = new NetworkCredential(username, password);
client.DownloadFile("http://feeds.itunes.apple.com/feeds/epf/v3/full/current/itunes20110511.tbz.md5", @"C:\folder\file.md5");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With