本文整理汇总了C#中BaseLib.clsDBQueryManager.InsertScreenNameFollower方法的典型用法代码示例。如果您正苦于以下问题:C# clsDBQueryManager.InsertScreenNameFollower方法的具体用法?C# clsDBQueryManager.InsertScreenNameFollower怎么用?C# clsDBQueryManager.InsertScreenNameFollower使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseLib.clsDBQueryManager
的用法示例。
在下文中一共展示了clsDBQueryManager.InsertScreenNameFollower方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Login
//.........这里部分代码省略.........
catch { }
string postData = "session%5Busername_or_email%5D=" + Uri.EscapeDataString(Username) + "&session%5Bpassword%5D=" + Uri.EscapeDataString(Password) + "&authenticity_token=" + postAuthenticityToken + "&scribe_log=&redirect_after_login=&authenticity_token=" + postAuthenticityToken + "&remember_me=1";
string response_Login = globusHttpHelper.postFormData(new Uri("https://twitter.com/sessions"), postData, "https://twitter.com/", proxyAddress, proxyPort, proxyUsername, proxyPassword);
//response_Login = GlobusFileHelper.ReadStringFromTextfile("C:/Users/GLB-111/Desktop/new.txt");
if (response_Login.Contains("अपनी पहचान सत्यापित करें") || response_Login.Contains("आपके खाते को सुरक्षित रखेने में हमें मदद करें.") || response_Login.Contains("Help us keep your account safe.") || response_Login.Contains("Verify your identity") || response_Login.Contains("account/login_challenge?"))
{
try
{
string temp_user_id = string.Empty;
string challenge_id = string.Empty;
challenge_id = response_Login.Substring(response_Login.IndexOf("name=\"challenge_id\" value="), (response_Login.IndexOf("/>", response_Login.IndexOf("name=\"challenge_id\" value=")) - response_Login.IndexOf("name=\"challenge_id\" value="))).Replace("name=\"challenge_id\" value=", string.Empty).Replace("\"", "").Trim();
temp_user_id = response_Login.Substring(response_Login.IndexOf("name=\"user_id\" value="), (response_Login.IndexOf("/>", response_Login.IndexOf("name=\"user_id\" value=")) - response_Login.IndexOf("name=\"user_id\" value="))).Replace("name=\"user_id\" value=", string.Empty).Replace("\"", "").Trim();
if (response_Login.Contains(" name=\"challenge_type\" value=\"RetypeEmail") && response_Login.Contains("@"))
{
postData = "authenticity_token=" + postAuthenticityToken + "&challenge_id=" + challenge_id + "&user_id=" + temp_user_id + "&challenge_type=RetypeEmail&platform=web&redirect_after_login=&remember_me=true&challenge_response=" + Screen_name;
response_Login = globusHttpHelper.postFormData(new Uri("https://twitter.com/account/login_challenge"), postData, "https://twitter.com/account/login_challenge?platform=web&user_id=" + temp_user_id + "&challenge_type=RetypeEmail&remember_me=true", proxyAddress, proxyPort, proxyUsername, proxyPassword);
}
else
{
postData = "authenticity_token=" + postAuthenticityToken + "&challenge_id=" + challenge_id + "&user_id=" + temp_user_id + "&challenge_type=RetypeScreenName&platform=web&redirect_after_login=&remember_me=true&challenge_response=" + Screen_name;
response_Login = globusHttpHelper.postFormData(new Uri("https://twitter.com/account/login_challenge"), postData, "https://twitter.com/account/login_challenge?platform=web&user_id=" + temp_user_id + "&challenge_type=RetypeScreenName&remember_me=true", proxyAddress, proxyPort, proxyUsername, proxyPassword);
}
}
catch { }
}
string homePage = globusHttpHelper.getHtmlfromUrl(new Uri("https://twitter.com"), "", "");
string responseURI = globusHttpHelper.gResponse.ResponseUri.ToString().ToLower();
if (response_Login.Contains("signout") || homePage.Contains("signout"))
{
postAuthenticityToken = PostAuthenticityToken(response_Login, "postAuthenticityToken");
try
{
int startIndx = response_Login.IndexOf("data-user-id=\"") + "data-user-id=\"".Length;
int endIndx = response_Login.IndexOf("\"", startIndx);
userID = response_Login.Substring(startIndx, endIndx - startIndx);
}
catch { }
if (string.IsNullOrEmpty(userID))
{
userID = string.Empty;
string[] useridarr = System.Text.RegularExpressions.Regex.Split(response_Login, "data-user-id=");
foreach (string useridarr_item in useridarr)
{
if (useridarr_item.Contains("data-screen-name="))
{
userID = useridarr_item.Substring(0 + 1, useridarr_item.IndexOf("data-screen-name=") - 3);
break;
}
}
}
IsLoggedIn = true;
Log("[ " + DateTime.Now + " ] => [ Logged in with " + Username + " ]");
GetScreen_name(homePage);
clsDBQueryManager Db = new clsDBQueryManager();
GetFollowercount();
Db.InsertScreenNameFollower(Screen_name, FollowerCount,FollwingCount, Username,ProfileFullName);
//GetDirectMessageDetails(Username, Password, Screen_name, FollowerCount, FollwingCount);
}
else if (response_Login.Contains("error"))
{
//Log("[ " + DateTime.Now + " ] => [ Login Error with " + Username + " ]");
IsLoggedIn = false;
IsNotSuspended = true;
GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUsername + ":" + proxyPassword, Globals.path_FailedLoginAccounts);
return;
}
//else if (responseURI.Contains("captcha"))//(globusHttpHelper.gResponse.ResponseUri.ToString().Contains("captcha"))
else if (response_Login.Contains("captcha"))
{
Log("[ " + DateTime.Now + " ] => [ Asking Captcha with " + Username + " ]");
IsLoggedIn = false;
GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUsername + ":" + proxyPassword, Globals.path_AskingCaptchaAccounts);
return;
}
else
{
IsLoggedIn = false;
//Log("Login Error in Account : " + Username + ":" + Password);
}
}
catch (Exception ex)
{
Log("[ " + DateTime.Now + " ] => [ Error in Login : " + Username + " ]");
Globals.proxyNotWorking = true;
GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUsername + ":" + proxyPassword, Globals.path_FailedLoginAccounts);
Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> Login() --> " + Username + ":" + Password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUsername + ":" + proxyPassword + " --> " + ex.Message, Globals.Path_TweetAccountManager);
return;
}
}