Exemplo n.º 1
0
        protected override async Task ConfigureCookieClient(ISiteHttpClient client, ILogin login)
        {
            await base.ConfigureCookieClient(client, login).ConfigureAwait(false);

            if (!client.GetCookies().Any(c => c.Name == "PHPSESSID"))
            {
                await client.GetPage(login.MainUri).ConfigureAwait(false);
            }
        }
Exemplo n.º 2
0
        protected override Task ConfigureCookieClient(ISiteHttpClient client, ILogin login)
        {
            var baseLogin = (BaseLogin)login;

            if (!string.IsNullOrWhiteSpace(baseLogin.UserId) && !client.GetCookies().Any(c => c.Name == "dle_user_id"))
            {
                client.AddCookie("dle_user_id", baseLogin.UserId);
                client.AddCookie("dle_password", baseLogin.PasswordHash);
            }

            return(base.ConfigureCookieClient(client, login));
        }