From here i get the json:
I have a video link:
Here is my code:
private void button1_Click(object sender, EventArgs e)
{
string dowloadLink = "https:" + textBoxUrl.Text + "&seekSchema=" + labelSeekSchema.Text + "&key=" + labelFileQuality.Text;
listBoxDownload.Items.Add(lblFileName.Text);
Thread thread = new Thread(() => {
WebClient client = new WebClient();
client.Headers.Add("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0)");
client.DownloadFileAsync(new Uri(dowloadLink), @"C:\\Temp\test.mp4");
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
});
thread.Start();
}
When I try to download it, I get a file of size 0.
Here is the answer postman:
403 Forbidden Time:104 ms Size:298 B
Access-Control-Allow-Credentials →true Access-Control-Allow-Headers →Range Access-Control-Allow-Methods →GET, OPTIONS, HEAD Access-Control-Allow-Origin →http://my.mail.ru Content-Length →0 Date →Tue, 05 Mar 2019 15:43:21 GMT Content-Type →text/plain; charset=utf-8
What is wrong?