Exemple #1
0
        public async Task GetChannelCookieNetAsync()
        {
            IChannel        ch     = ChannelFactory.CreateChannel(SiteType.Tapochek);
            CookieContainer cookie = await tf.GetCookieNetAsync(ch).ConfigureAwait(false);

            Assert.IsTrue(cookie.Count > 0);
        }
        public static async Task FillChannelCookieNetAsync(IChannel channel)
        {
            switch (channel.Site)
            {
            case SiteType.Tapochek:

                TapochekSite fb = CommonFactory.CreateTapochekSite();
                channel.ChannelCookies = await fb.GetCookieNetAsync(channel).ConfigureAwait(false);

                break;

            default:
                throw new Exception(channel + " is not implemented yet");
            }
        }