Example #1
0
        public static void Import(string filename)
        {
            List <Channel> Channels = ReadWriteOps.ReadJsonFile(filename);

            IWebDriver driver = new ChromeDriver();

            YouTubeOps.Login(driver);

            foreach (Channel channel in Channels)
            {
                YouTubeOps.Subscribe(driver, channel);
            }

            Console.ReadKey();
            driver.Close();
        }
Example #2
0
        public static void Export(string filename)
        {
            Console.WriteLine("Hello Universe");

            IWebDriver driver = new ChromeDriver();

            YouTubeOps.Login(driver);

            List <Channel> Channels = YouTubeOps.GetChannels(driver);

            PrintChannels(Channels);

            //WriteTextFile(channels, "out.txt");
            ReadWriteOps.WriteJsonFile(Channels, filename);

            Console.ReadKey();
            driver.Close();

            Console.WriteLine("Okey!");
        }