Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Youku speed up claiming
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
namespace HttpWebRequestDemo
{
class Program
{
async static Task<int> Run(string user, string pass) {
HttpClient client = new HttpClient();
Dictionary<string, string> loginDict= new Dictionary<string, string>();
loginDict.Add("passport", user);
loginDict.Add("password", pass);
loginDict.Add("captcha", "");
loginDict.Add("remember", "1");
loginDict.Add("callback", "logincallback_d");
loginDict.Add("from", "http://login.youku.com/@@@@");
loginDict.Add("wintype", "page");
FormUrlEncodedContent loginContent = new FormUrlEncodedContent(loginDict);
HttpResponseMessage response = await client.PostAsync("https://login.youku.com/user/login_submit/", loginContent);
await client.GetAsync(response.Headers.Location);
response = await client.PostAsync("http://vip.youku.com/?c=ajax&a=ajax_do_speed_up", new StringContent(""));
Console.WriteLine(await response.Content.ReadAsStringAsync());
return 0;
}
static void Main(string[] args)
{
Task.Run(async () => {
await Run("nideqq@qq.com", "nidemima");
}).Wait();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment