Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void timer1_Tick(object sender, EventArgs e)
- {
- var linkss = webBrowser1.Document.GetElementsByTagName("lnrre");
- foreach (HtmlElement linksd in linkss)
- {
- if (linksd.InnerText != null)
- {
- if (linksd.InnerText == "Load more comments")
- {
- linksd.InvokeMember("click");
- }
- else
- {
- timer2.Start();
- }
- }
- }
- }
- private void timer2_Tick(object sender, EventArgs e)
- {
- var links = webBrowser1.Document.GetElementsByTagName("li");
- foreach (HtmlElement link in links)
- {
- if (link.GetAttribute("className") == "gElp9")
- {
- var Name = link.InnerHtml.Split(new string[] { "FPmhX notranslate TlrDj" }, StringSplitOptions.RemoveEmptyEntries)[1];
- var Name1 = Name.Split(new string[] { "\"" }, StringSplitOptions.RemoveEmptyEntries)[0];
- string NAME = Name1;
- if (!listBox1.Items.Contains(NAME))
- {
- C++;
- listBox1.Items.Add(NAME);
- listBox1.SelectedItem = listBox1.Items[listBox1.Items.Count - 1];
- label1.Text = "Count : " + C;
- }
- else
- {
- timer2.Stop();
- return;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement