Esempio n. 1
0
        public OPGGLIVE()
        {
            Ranks = new List <Info>();
            WebClient           Getinfo = new WebClient();
            WebHeaderCollection WHC     = new WebHeaderCollection();

            Getinfo.Headers = WHC;
            WHC.Add("Accept-Language: en-US,en;q=0.8"); // Don't want any korean shit
            //Getinfo.Encoding = System.Text.Encoding.UTF8;
            String username = Misc.GetRandomHero().Name;

            Game.PrintChat(username);
            byte[] databytes = Getinfo.DownloadData("http://" + Misc.sortedregion() + ".op.gg/summoner/ajax/spectator/userName="******"&force=true");
            string data      = System.Text.Encoding.UTF8.GetString(databytes, 0, databytes.Length);

            System.IO.File.WriteAllText(@"C:\Users\Laptop\Desktop\inbetween.txt", data); // Testing purposes
            ExtractInformation(data);
        }