- Autocommit - 2022/09/22 08:54:52
This commit is contained in:
1 parent
fdc20dc0bc
commit
89a92fd8a1
1 file changed
+8
-7
@@ -89,16 +89,17 @@ namespace A69WD {
|
||||
string lk = toDownload.First();
|
||||
toDownload.Remove(lk);
|
||||
using (WebClient client = new WebClient()) {
|
||||
string fn = Path.Combine(Cfg.Settings.PathAnalizadedRaccFile, GetFileName(lk));
|
||||
client.Encoding = Encoding.ASCII;
|
||||
client.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0");
|
||||
client.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||
client.Headers.Add("Cookie", "euconsent-v2=CPG74goPG74goAKAeAENBcCsAP_AAH_AAAwIH3tf_X__bX9j-_59__t0eY1f9_7_v-wzjhfdt-8N2P_X_L0X42E7PF36pq4KuR4Eu3LBIQNlHOHUTUmw6okVrTPsak2Mr7NKJ7LEmnMZe2dYGHtfn91TuZKY7_78_9fz3_-v_v___9f3r-3_3__59X---_e_V399zLv9__3__9gfiASYal8AF2JY4Mk0aVQogQhWEh0AoAKKAYWiawgYXBTsrAI9QQMAEJqAjAiBBiCjFgEAAgEASERASAHggEQBEAgABACpAQgAImAQWAFgYBAAKAaFiBFAEIEhBkcFRymBARItFBPZWAJRd7GmEIZRYAUCj-iowEShBAsDISFg5gAA.YAAAAAAAAAAA");
|
||||
client.Headers.Add("DNT", "1");
|
||||
client.Headers.Add("TE", "Trailers");
|
||||
//client.DownloadFile(new Uri(lk), fn);
|
||||
client.DownloadProgressChanged += Client_DownloadProgressChanged;
|
||||
client.DownloadFileCompleted += Client_DownloadFileCompleted;
|
||||
string fn = Path.Combine(Cfg.Settings.PathAnalizadedRaccFile, GetFileName(lk));
|
||||
client.DownloadFile(new Uri(lk), fn);
|
||||
client.DownloadFileAsync(new Uri(lk), fn);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,9 +346,6 @@ namespace A69WD {
|
||||
|
||||
|
||||
private void Client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e) {
|
||||
MessageBox.Show("Download complete !", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
|
||||
return;
|
||||
object obj = new Object();
|
||||
lock (obj) {
|
||||
|
||||
@@ -356,9 +354,11 @@ namespace A69WD {
|
||||
StringBuilder sb;
|
||||
if (state == EngineStatusEnum.Starting) state = EngineStatusEnum.Started;
|
||||
|
||||
WebBrowser wb = sender as WebBrowser;
|
||||
string link = wb.Url.ToString();
|
||||
WebClient wb = sender as WebClient;
|
||||
string link = wb.BaseAddress;
|
||||
|
||||
return;
|
||||
/*
|
||||
// Se link di logon, devo terminare i download
|
||||
if (link == "https://www.annunci69.it/accedi.php?nop") {
|
||||
// Finito download:
|
||||
@@ -425,6 +425,7 @@ namespace A69WD {
|
||||
SaveState();
|
||||
}
|
||||
|
||||
//*/
|
||||
}//lock
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user