[C#] 纯文本查看 复制代码 public string region(string userName, string passWord, string Email,string proxy,ref Image img)
{
string referer = "http://www.douyutv.com/member/register?ref_url=%2Fapi%2Foauth2%2Fauthorize_inside%3Fclient_id%3D1%26redirect_uri%3Dhttp%253A%252F%252Fyuba.douyutv.com%252Fauthlogin%26response_type%3Dcode#";
string url = "http://www.douyutv.com/member/login/check_capcha_status";
string postData = "";
string cookie = "";
string HTML = HTTP.GetHtml(url, postData, referer, cookie, proxy);
string id = HTTP.RegStr(HTML, "id\":\"([\\S]*)\"");
url = "http://api.geetest.com/get.php?gt=" + id;
HTML = HTTP.GetHtml(url, "", ref cookie, proxy);
url = "http://www.douyutv.com/member/register/validate/nickname?data=" + userName;
HTML = HTTP.GetHtml(url, referer,ref cookie, proxy);
string cookies =HTTP.RegStr(cookie,"(PHPSESSID=[\\S]*;) p");
url = "http://www.douyutv.com/member/register/check_email?email=" + Email + "%40qq.com";
HTML = HTTP.GetHtml(url, referer, cookie);
;
//if (!HTML.Contains("0"))
// return "账号被注册";
url = "http://www.douyutv.com/member/register/regcaptcha?_t=" + new Random().NextDouble().ToString() + new Random().Next(9).ToString();
string code = Code(url, cookie, proxy,ref img);
Console.WriteLine(code);
cookie = cookies;
url = "http://www.douyutv.com/member/register/ajax";
postData = "captcha_word=" + code + "&email=" + Email + "%40qq.com" + "&nickname=" + userName + "&password=" + passWord + "&password2=" + passWord + "&redirect=%2Fapi%2Foauth2%2Fauthorize_inside%3Fclient_id%3D1%26redirect_uri%3Dhttp%3A%2F%2Fyuba.douyutv.com%2Fauthlogin%26response_type%3Dcode";
HTML = HTTP.GetHtml(url, postData, referer, cookie, proxy);
Console.WriteLine(HTML);
return "";
}
用的是你的HTTPHelper
然后我用易语言的一个模块访问提交就成功了 醉醉哒 |