public async Task AddUrl() { while (true) { await Task.Delay(1000); try { var client = new RestClient(_host); var request = new RestRequest($"GetUrl/{Properties.Settings.Default.Key}"); var res = await client.ExecuteAsync(request); if (res.Content == "\"no\"" || res.Content == "") { continue; } try { await SeleniumBot.ParseLink(res.Content, false, 0, false); } catch { } } catch { } } }
private async void addUrl_btn_Click(object sender, EventArgs e) { await SeleniumBot.ParseLink(link_textBox.Text, false, 0, parseNow_checkBox.Checked); }