Exemplo n.º 1
0
        public void Unfollow()
        {
            DOM.Find(".coreSpriteDesktopNavProfile").Click();
            DOM.Find("a[href*=following]").Click();
            String st     = "._4gt3b";
            String script = String.Format("var objDiv = document.getElementsByClassName(\"_4gt3b\")[0];objDiv.scrollTop = objDiv.scrollHeight;");

            for (int i = 0; i < 50; i++)
            {
                DOM.ExecuteJavascript(script);
                Wait(1000);
            }


            List <DomElement> followButtons = DOM.FindMany("._ah57t._6y2ah._i46jh._rmr7s").ToList();
            Random            rnd           = new Random();
            int counter = 0;

            foreach (var btn in followButtons)
            {
                counter++;
                btn.Click();
                Wait(rnd.Next(10, 15) * 1000);
                Console.WriteLine("Unfollowed " + counter + " accounts.");
            }
        }