本文整理汇总了C#中BaseLibID.InstagramUser类的典型用法代码示例。如果您正苦于以下问题:C# InstagramUser类的具体用法?C# InstagramUser怎么用?C# InstagramUser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InstagramUser类属于BaseLibID命名空间,在下文中一共展示了InstagramUser类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: getComment
public void getComment(string CommentIdsForMSG_item , ref InstagramUser usercomment)
{
try
{
lstThreadsCommentPoster.Add(Thread.CurrentThread);
lstThreadsCommentPoster.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
Queue<string> CommentIdQueue = new Queue<string>();
Queue<string> MsgQueue = new Queue<string>();
try
{
string photoLikeresult = string.Empty;
photoLikeresult = string.Empty;
string message = ClGlobul.commentMsgList[RandomNumberGenerator.GenerateRandom(0, ClGlobul.commentMsgList.Count)];
try
{
string status = Comment(CommentIdsForMSG_item, message,ref usercomment );
if (status == "Success")
{
DataBaseHandler.InsertQuery("insert into tbl_AccountReport(ModuleName,Account_User,DateTime, Photo_Id, Message,Status) values('" + "CommentModule" + "','" + usercomment.username + "','" + DateTime.Now+ "','" + CommentIdsForMSG_item + "','" + message + "','" + status + "')", "tbl_AccountReport");
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ comment is successfully posted from " +usercomment.username+ " To ===> " + CommentIdsForMSG_item +"]");
}
else
{
if( status == "Instagram API does not respond")
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Instagram API does not respond on " + CommentIdsForMSG_item + "]");
}
else
{
if(status == "Fail")
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Fail to comment " + CommentIdsForMSG_item + "]");
}
}
}
if (minDelayCommentPoster != 0)
{
mindelay = minDelayCommentPoster;
}
if (maxDelayCommentPoster != 0)
{
maxdelay = maxDelayCommentPoster;
}
int delay = RandomNumberGenerator.GenerateRandom(mindelay, maxdelay);
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Delay For " + delay + " Seconds For " + usercomment.username + " ]");
Thread.Sleep(delay * 1000);
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
finally
{
// GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Comment is Finished From Account : " + usercomment.username + " ]");
}
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
}
开发者ID:sumitglobussoft,项目名称:instagram-dominator-2.0,代码行数:79,代码来源:CommentManager.cs
示例2: Start_LikeFollowerpicture
public void Start_LikeFollowerpicture(ref InstagramUser Obj_Likefollowerpic)
{
try
{
lstThreadsUsingUsername.Add(Thread.CurrentThread);
lstThreadsUsingUsername.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
string response =string.Empty;
try
{
if (string.IsNullOrEmpty(UsingUsercontrol_Like_path))
{
if (!string.IsNullOrEmpty(UsingUsercontrol_Like_single))
{
string s = UsingUsercontrol_Like_single;
if (s.Contains(","))
{
string[] data = Regex.Split(s, ",");
foreach (string item in data)
{
ClGlobul.UsingUsername_Usernmaelist.Add(item);
}
}
else
{
ClGlobul.UsingUsername_Usernmaelist.Add(UsingUsercontrol_Like_single);
ClGlobul.UsingUsername_Usernmaelist.Distinct();
}
}
}
foreach (string user in ClGlobul.UsingUsername_Usernmaelist)
{
int count = 0;
ClGlobul.UsingUsername_likeFollowerpicture.Clear();
string res_secondURL = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri("https://www.instagram.com/"), "");
string home_respone = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri("https://www.instagram.com/" + user+"/"));
try
{
string Home_icon_Url = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri("http://iconosquare.com"), "");
string Icon_url = IGGlobals.Instance.IGiconosquareAuthorizeurl;
string PPagesource = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri(Icon_url), "");
string responce_icon = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri(IGGlobals.Instance.IGiconosquareviewUrl), "");
if (!string.IsNullOrEmpty(responce_icon))
{
string url = "http://iconosquare.com/viewer.php#/search/" + user;
//postData = "q=" + Uri.EscapeDataString(itemHash);
//if (!itemHash.Contains("#"))
//{
// url = IGGlobals.Instance.IGwebstaSearchUrl + postData.Substring(postData.IndexOf("=") + 1);
//}
//else
//{
// url = IGGlobals.Instance.IGwebstaSearchUrl + postData.Substring(postData.IndexOf("=") + 1).Replace("%23", "");
//}
string referer = "http://iconosquare.com/viewer.php";
string viewer_responce = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri("http://iconosquare.com/viewer.php "), "");
string crs_token = Utils.getBetween(viewer_responce, " <div id=\"accesstoken\" style=\"display:none;\">", "</div>");
response = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri(url), "");
string postdata = "http://iconosquare.com/rqig.php?e=/users/search&a=ico2&t=" + crs_token + "&q=" + user;
string respon_scrapeuser = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri(postdata), referer);
string ID = Utils.getBetween(respon_scrapeuser, "id\":\"", "\"");
//string[] data_divided = Regex.Split(respon_scrapeuser, "username");
string Profile_user = "http://iconosquare.com/viewer.php#/user/" + ID + "/";
string post_data = "http://iconosquare.com/rqig.php?e=/users/" + ID + "/follows&a=ico2&t=" + crs_token + "&count=20";
string list_follower = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri("http://iconosquare.com/viewer.php#/followers/" + ID), "");
string follow_respo = Obj_Likefollowerpic.globusHttpHelper.getHtmlfromUrl(new Uri(post_data), "http://iconosquare.com/viewer.php");
string[] data = Regex.Split(follow_respo, "username");
foreach (string item in data)
{
try
{
if (item.Contains("profile_picture"))
{
string follower_name = Utils.getBetween(item, "\":\"", "\"");
if (UsingUsername_like_Nouser > count)
{
ClGlobul.UsingUsername_likeFollowerpicture.Add(follower_name);
GlobusLogHelper.log.Info(follower_name);
count++;
}
else
{
break;
}
}
}
catch (Exception ex)
{
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:instagram-dominator-2.0,代码行数:101,代码来源:UsingUsernameManager.cs
示例3: Start_onlycommentonfollowerphoto
public void Start_onlycommentonfollowerphoto(ref InstagramUser obj_onlycomment)
{
try
{
lstThreadsUsingUsername.Add(Thread.CurrentThread);
lstThreadsUsingUsername.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
try
{
if ((!string.IsNullOrEmpty(UsingUsercontrol_onlycomment_single)) && (!string.IsNullOrEmpty(UsingUsercontrol_onlycommentmessage_single)))
{
string s = UsingUsercontrol_onlycomment_single;
if (s.Contains(","))
{
string[] data = Regex.Split(s, ",");
foreach (string item in data)
{
ClGlobul.UsingUsername_onlycommentusernameList.Add(item);
}
}
else
{
ClGlobul.UsingUsername_onlycommentusernameList.Add(UsingUsercontrol_onlycomment_single);
}
string k = UsingUsercontrol_onlycommentmessage_single;
if (k.Contains(","))
{
string[] data1 = Regex.Split(k, ",");
foreach (string item1 in data1)
{
ClGlobul.UsingUsername_onlycommentmessageList.Add(item1);
}
}
else
{
ClGlobul.UsingUsername_onlycommentmessageList.Add(UsingUsercontrol_onlycommentmessage_single);
}
}
foreach (string user in ClGlobul.UsingUsername_onlycommentusernameList)
{
try
{
string resp = obj_onlycomment.globusHttpHelper.getHtmlfromUrl(new Uri("https://www.instagram.com"), "");
int count = 0;
ClGlobul.UsingUsername_commentFollowerpicture.Clear();
string response = string.Empty;
try
{
string Home_icon_Url = obj_onlycomment.globusHttpHelper.getHtmlfromUrl(new Uri("http://iconosquare.com"), "");
string Icon_url = IGGlobals.Instance.IGiconosquareAuthorizeurl;
string PPagesource = obj_onlycomment.globusHttpHelper.getHtmlfromUrl(new Uri(Icon_url), "");
string responce_icon = obj_onlycomment.globusHttpHelper.getHtmlfromUrl(new Uri(IGGlobals.Instance.IGiconosquareviewUrl), "");
if (!string.IsNullOrEmpty(responce_icon))
{
string url = "http://iconosquare.com/viewer.php#/search/" + user;
//postData = "q=" + Uri.EscapeDataString(itemHash);
//if (!itemHash.Contains("#"))
//{
// url = IGGlobals.Instance.IGwebstaSearchUrl + postData.Substring(postData.IndexOf("=") + 1);
//}
//else
//{
// url = IGGlobals.Instance.IGwebstaSearchUrl + postData.Substring(postData.IndexOf("=") + 1).Replace("%23", "");
//}
string referer = "http://iconosquare.com/viewer.php";
string viewer_responce = obj_onlycomment.globusHttpHelper.getHtmlfromUrl(new Uri("http://iconosquare.com/viewer.php "), "");
string crs_token = Utils.getBetween(viewer_responce, " <div id=\"accesstoken\" style=\"display:none;\">", "</div>");
response = obj_onlycomment.globusHttpHelper.getHtmlfromUrl(new Uri(url), "");
string postdata = "http://iconosquare.com/rqig.php?e=/users/search&a=ico2&t=" + crs_token + "&q=" + user;
string respon_scrapeuser = obj_onlycomment.globusHttpHelper.getHtmlfromUrl(new Uri(postdata), referer);
string ID = Utils.getBetween(respon_scrapeuser, "id\":\"", "\"");
//string[] data_divided = Regex.Split(respon_scrapeuser, "username");
string Profile_user = "http://iconosquare.com/viewer.php#/user/" + ID + "/";
string post_data = "http://iconosquare.com/rqig.php?e=/users/" + ID + "/follows&a=ico2&t=" + crs_token + "&count=20";
string list_follower = obj_onlycomment.globusHttpHelper.getHtmlfromUrl(new Uri("http://iconosquare.com/viewer.php#/followers/" + ID), "");
string follow_respo = obj_onlycomment.globusHttpHelper.getHtmlfromUrl(new Uri(post_data), "http://iconosquare.com/viewer.php");
string[] data = Regex.Split(follow_respo, "username");
foreach (string item in data)
{
try
{
if (item.Contains("profile_picture"))
{
string follower_name = Utils.getBetween(item, "\":\"", "\"");
if (UsingUsername_onlycomment_Nouser > count)
{
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:instagram-dominator-2.0,代码行数:101,代码来源:UsingUsernameManager.cs
示例4: Follow
public string Follow(string UserName, ref InstagramUser accountManager)
{
try
{
lstThreadsFollowerPoster.Add(Thread.CurrentThread);
lstThreadsFollowerPoster.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
GlobusHttpHelper obj = accountManager.globusHttpHelper;
// string res_secondURL = obj.getHtmlfromUrl(new Uri(IGGlobals.Instance.IGTestURL), "");
string res_secondURL = obj.getHtmlfromUrl(new Uri("https://www.instagram.com"), "");
if (!UserName.Contains(IGGlobals.Instance.IGWEP_HomePage))
{
//UserName = IGGlobals.Instance.IGWEP_HomePage + UserName + "/";
UserName = "https://www.instagram.com/" + UserName + "/";
}
string UserPageContent = string.Empty;
if (!string.IsNullOrEmpty(accountManager.proxyip) && !string.IsNullOrEmpty(accountManager.proxyport))
{
try
{
UserPageContent = accountManager.globusHttpHelper.getHtmlfromUrlProxy(new Uri(UserName), accountManager.proxyip, Convert.ToInt32(accountManager.proxyport), accountManager.proxyusername, accountManager.proxypassword);
}
catch (Exception ex)
{
}
if (string.IsNullOrEmpty(UserPageContent))
{
Thread.Sleep(1000);
try
{
UserPageContent = accountManager.globusHttpHelper.getHtmlfromUrlProxy(new Uri(UserName), accountManager.proxyip, Convert.ToInt32(accountManager.proxyport), accountManager.proxyusername, accountManager.proxypassword);
}
catch (Exception ex)
{
}
}
}
else
{
try
{
UserPageContent = accountManager.globusHttpHelper.getHtmlfromUrlProxy(new Uri(UserName), "", 80, "", "");
}
catch { };
if (string.IsNullOrEmpty(UserPageContent))
{
Thread.Sleep(1000);
try
{
UserPageContent = accountManager.globusHttpHelper.getHtmlfromUrlProxy(new Uri(UserName), "", 80, "", "");
}
catch { };
}
}
if (chkNotSendRequest == true)
{
if (UserPageContent.Contains("\"is_private\":true"))
{
return "User is Private";
}
}
try
{
//if (UserPageContent.Contains("This user is private."))
//{
// return "private";
//}
string PK = string.Empty;
if (UserPageContent.Contains(""))
{
// PK = Utils.getBetween(UserPageContent, "id=\"follow_btn_wrapper\"", ">").Replace("data-target=", "").Replace("\"", "").Trim();
PK = Utils.getBetween(UserPageContent, "\"id\":", "\",").Replace("\"","");
}
if (string.IsNullOrEmpty(PK))
{
PK = Utils.getBetween(UserPageContent, "id=\"message_user_id", ">").Replace(">", "").Replace("value=", string.Empty).Replace("\"", string.Empty).Trim();//.Replace("\"", "").Trim();
}
string PostData = "action=follow";//"&pk=" + PK + "&t=9208";
string postData = "https://www.instagram.com/web/friendships/" + PK + "/follow/";
string FollowedPageSource = string.Empty;
if (!string.IsNullOrEmpty(PK))
{
try
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:101,代码来源:FollowerFollowing.cs
示例5: bothlikecomment
public void bothlikecomment(string photoId, string photoMsg, ref InstagramUser User_comment)
{
try
{
lstThreadsUsingUsername.Add(Thread.CurrentThread);
lstThreadsUsingUsername.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
try
{
string status_Like = UsingUserName_liking(ref User_comment, photoId);
string status_comment = Comment(photoId, photoMsg, ref User_comment);
if (status_Like == "LIKED" && status_comment == "Success")
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Comment and Like is successfully posted from " + photoId + "]");
}
if (status_Like == "LIKED" && status_comment == "Fail")
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Comment Not Done But Like is successfully posted from " + photoId + "]");
}
if (status_comment == "Success" && status_Like == "Already LIKED")
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Comment Done But Like is Allready Done on " + photoId + "]");
}
if (status_Like == "Instagram API does not respond" && status_comment == "Instagram API does not respond")
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Fail to comment and Like on Because Instagram API does not respond " + photoId + "]");
}
if(status_Like == "" && status_comment == "Success")
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ only comment done on " + photoId + "]");
}
if (status_Like == "" && status_comment == "Fail")
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Fail to comment and Like on " + photoId + "]");
}
else
{
}
if (minDelayUsingUsername != 0)
{
mindelay = minDelayUsingUsername;
}
if (maxDelayUsingUsername != 0)
{
maxdelay = maxDelayUsingUsername;
}
int delay = RandomNumberGenerator.GenerateRandom(mindelay, maxdelay);
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Delay For " + delay + " Seconds For " + User_comment.username + " ]");
Thread.Sleep(delay * 1000);
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
}
开发者ID:sumitglobussoft,项目名称:instagram-dominator-2.0,代码行数:64,代码来源:UsingUsernameManager.cs
示例6: unfollowBackUser
public void unfollowBackUser(ref InstagramUser accountManager, string account, int count)
{
try
{
lstThreadsunFollowerBack.Add(Thread.CurrentThread);
lstThreadsunFollowerBack.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
GlobusHttpHelper obj = accountManager.globusHttpHelper;
// string res_secondURL = obj.getHtmlfromUrl(new Uri(IGGlobals.Instance.IGTestURL), "");
string res_secondURL = obj.getHtmlfromUrl(new Uri("https://www.instagram.com"), "");
string pageSource = string.Empty;
string response = string.Empty;
string profileId = string.Empty;
const string websta = "http://websta.me/api/relationships/";
// const string accountUrl = "http://websta.me/n/";
const string accountUrl = "https://www.instagram.com/";
try
{
try
{
if (account.Contains(IGGlobals.Instance.IGWEP_HomePage))
{
pageSource = accountManager.globusHttpHelper.getHtmlfromUrlProxy(new Uri(account), "", 80, "", "");
}
else
{
pageSource = accountManager.globusHttpHelper.getHtmlfromUrlProxy(new Uri(accountUrl + account), "", 80, "", "");
}
}
catch { };
if (pageSource.Contains("followed_by_viewer\":false") && pageSource.Contains("requested_by_viewer\":false"))
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [Allready Unfollowed " + account + " from " + accountManager.username + " Count" + count + "]");
return;
}
else if (!string.IsNullOrEmpty(pageSource))
{
try
{
// string test = accountManager.globusHttpHelper.getHtmlfromUrl(new Uri(UserName));
// string txt_name = Utils.getBetween(UserName, "www.instagram.com/", "/");
string csrf_token = Utils.getBetween(pageSource, "csrf_token\":\"", "\"");
string PK = Utils.getBetween(pageSource, "\"id\":", "\",").Replace("\"", "");
string postdata = "https://www.instagram.com/web/friendships/" + PK + "/unfollow/";
response = accountManager.globusHttpHelper.postFormDatainta(new Uri(postdata), "", "https://www.instagram.com/" + account + "/", csrf_token);
}
catch (Exception ex)
{
}
if (!string.IsNullOrEmpty(response) && response.Contains("ok"))
{
//if (_boolStopUnfollow) return;
DataBaseHandler.InsertQuery("insert into tbl_AccountReport(ModuleName,Account_User,DateTime ,UnfollowUser,Status) values('" + "UnfollowModule" + "','" + accountManager.username + "','" + DateTime.Now + "','" + account + "','" + "Success" + "')", "tbl_AccountReport");
string status = string.Empty;
try
{
status = QueryExecuter.getFollowStatus(accountManager.username, account);
switch (status)
{
//case "Followed": QueryExecuter.updateFollowStatus(accountManager.Username, account, "Unfollowed");
case "Followed": QueryExecuter.updateFollowStatus(accountManager.username, account, "Unfollowed");
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Unfollowed " + account + " from " + accountManager.username + " Count" + count + "]");
try
{
// NoOfUnFollowCompleted++;
string path_AppDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\Gram Dominator";
path_AppDataFolder = path_AppDataFolder + "\\UnFollwedList";
if (!File.Exists(path_AppDataFolder))
{
Directory.CreateDirectory(path_AppDataFolder);
}
string FollowIDFilePath = path_AppDataFolder + "\\" + accountManager.username + ".csv";
string CSV_Header = "Username,UnFollowerName,Unfollowed";
string CSV_Content = accountManager.username.Replace(",", "") + "," + account.Replace(",", "") + "," + status;
GlobusFileHelper.ExportDataCSVFile(CSV_Header, CSV_Content, FollowIDFilePath);
List<string> StrListReadData = new List<string>();
try
{
try
{
StreamReader strReader = new StreamReader(ClGlobul.UnFollowerListUploadedPath);
string text = "";
while ((text = strReader.ReadLine()) != null)
{ //string strUserListFromFilePath = strReader.ReadToEnd();
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:101,代码来源:FollowerFollowing.cs
示例7: Start_Action_UserFollower
public void Start_Action_UserFollower(ref InstagramUser obj_Gram)
{
try
{
lstThreadsUserFollower.Add(Thread.CurrentThread);
lstThreadsUserFollower.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
try
{
string[] lst_UserFollower_listedUser = ClGlobul.lstUserFollower_Username.ToArray();
GlobusHttpHelper obj_globul = new GlobusHttpHelper();
bool value = false;
string proxyAddress = string.Empty;
string proxyport = "80";
string proxyusername = string.Empty;
string proxypasswrd = string.Empty;
List<string> lst_workingfinalproxy = new List<string>();
string[] lst_Userfollowerlist = {};
try
{
DataSet ds = DataBaseHandler.SelectQuery("select * from tlb_WorkingProxy", "tlb_WorkingProxy");
DataTable dt = ds.Tables[0];
foreach (DataRow item in dt.Rows)
{
lst_workingfinalproxy.Add(item[1] + ":" + item[2] + ":" + item[3] + ":" + item[4]);
}
}
catch (Exception ex)
{
}
try
{
if (lst_workingfinalproxy.Count > 0)
{
string res_secondURL = obj_Gram.globusHttpHelper.getHtmlfromUrl_withProxt(new Uri("https://www.instagram.com"), proxyAddress, int.Parse(proxyport), proxyusername, proxypasswrd);
string proxy = lst_workingfinalproxy[RandomNumberGenerator.GenerateRandom(0, lst_workingfinalproxy.Count)];
string[] proxydata = Regex.Split(proxy, ":");
if (proxydata.Count() == 2)
{
proxyAddress = proxydata[0];
proxyport = proxydata[1];
}
if (proxydata.Count() == 4)
{
proxyAddress = proxydata[0];
proxyport = proxydata[1];
proxyusername = proxydata[2];
proxypasswrd = proxydata[3];
}
}
}
catch (Exception ex)
{
}
foreach(string username in lst_UserFollower_listedUser)
{
string gramfeed_user_Url = "http://www.gramfeed.com/" + username;
// Username_ScrapFollower = itemusername;
List<string> follower_list = new List<string>();
int count = 0;
ClGlobul.switchAccount = false;
string GramFeed_Userhit = obj_globul.getHtmlfromUrl_withProxt(new Uri(gramfeed_user_Url), proxyAddress, int.Parse(proxyport), proxyusername, proxypasswrd);
string client_Id = Utils.getBetween(GramFeed_Userhit, "client_id=", "&");
string Id_Url = "https://api.instagram.com/v1/users/search?q=" + username + "&client_id=" + client_Id + "&callback=jQuery183011914858664385974_1455619732855&_=1455619735024";
string Gram_Hit_second = obj_globul.getHtmlfromUrl_withProxt(new Uri(Id_Url), proxyAddress, int.Parse(proxyport), proxyusername, proxypasswrd);
if (string.IsNullOrEmpty(Gram_Hit_second))
{
Thread.Sleep(1 * 3000);
Gram_Hit_second = obj_ChangeProxy.chnageproxyMethod(Id_Url);
}
string GramFeed_UserId = Utils.getBetween(Gram_Hit_second, "\"id\":", "\",").Replace("\"", "").Replace(" ", "");
string Follower_Url = "https://api.instagram.com/v1/users/" + GramFeed_UserId + "/followed-by?client_id=" + client_Id + "&callback=jQuery183011914858664385974_1455619732855&_=1455619735024";
string GramFeed_UserFollower = obj_globul.getHtmlfromUrl_withProxt(new Uri(Follower_Url), proxyAddress, int.Parse(proxyport), proxyusername, proxypasswrd);
if (string.IsNullOrEmpty(GramFeed_UserFollower))
{
if (lst_workingfinalproxy.Count > 0)
{
GramFeed_UserFollower = obj_ChangeProxy.chnageproxyMethod(Follower_Url);
}
else
{
Thread.Sleep(1 * 3000);
GramFeed_UserFollower = obj_globul.getHtmlfromUrl_withProxt(new Uri(Follower_Url), proxyAddress, int.Parse(proxyport), proxyusername, proxypasswrd);
}
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:101,代码来源:FollowerFollowing.cs
示例8: like_follow
public void like_follow(ref InstagramUser Gram_follow_like)
{
try
{
if(string.IsNullOrEmpty(UserName_path_followWithLike))
{
}
try
{
string Photo_Idd = string.Empty;
string Username = string.Empty;
foreach(string Photo_Id in ClGlobul.lstphotoId_Followwithlike)
{
if(Photo_Id.Contains("https://www.instagram.com/p/"))
{
Photo_Idd = Photo_Id.Replace("https://www.instagram.com/p/", "").Replace("/","");
}
else
{
Photo_Idd = Photo_Id;
}
string URL = "https://www.instagram.com/p/" + Photo_Idd;
string URL_Responce = Gram_follow_like.globusHttpHelper.getHtmlfromUrl(new Uri(URL));
if(URL_Responce.Contains("followed_by_viewer\":false"))
{
Username = Utils.getBetween(URL_Responce,"owner\":{\"username\":\"","\"");
string Result = Follow(Username, ref Gram_follow_like);
if (Result == "Followed")
{
GlobusLogHelper.log.Info(Gram_follow_like.username + "==> Start Follow ==> " + Username);
}
}
else
{
if(URL_Responce.Contains("followed_by_viewer\":true"))
{
Username = Utils.getBetween(URL_Responce, "owner\":{\"username\":\"", "\"");
GlobusLogHelper.log.Info( " Already Follow--" + Username + "-- By ==> " + Gram_follow_like.username);
}
}
if(URL_Responce.Contains("viewer_has_liked\":false"))
{
string Status = photolike(Photo_Id, ref Gram_follow_like);
if (Status == "LIKED")
{
GlobusLogHelper.log.Info(Gram_follow_like.username + "==> LIKED PHOTO ==> " + Photo_Id);
}
}
else
{
if(URL_Responce.Contains("viewer_has_liked\":true"))
{
GlobusLogHelper.log.Info(" Already Like--" + Photo_Id + "-- By ==> " + Gram_follow_like.username);
}
}
if (minDelayFollowerwithlikePoster != 0)
{
mindelay = minDelayFollowerwithlikePoster;
}
if (maxDelayFollowerwithlikePoster != 0)
{
maxdelay = maxDelayFollowerwithlikePoster;
}
Random FolloweRandom = new Random();
int delay = RandomNumberGenerator.GenerateRandom(mindelay, maxdelay);
delay = FolloweRandom.Next(mindelay, maxdelay);
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Delay For " + delay + " Seconds ]");
Thread.Sleep(delay * 1000);
}
}
catch(Exception ex)
{
}
}
catch(Exception ex)
{
}
finally
{
GlobusLogHelper.log.Info("==================================");
GlobusLogHelper.log.Info("---- Proccess Completed ----");
GlobusLogHelper.log.Info("==================================");
}
}
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:92,代码来源:FollowerFollowing.cs
示例9: FollowUrls
public void FollowUrls(ref InstagramUser accountManager, string url)
{
try
{
//lstThreadsHash_comment.Add(Thread.CurrentThread);
//lstThreadsHash_comment.Distinct();
//Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
string followStatus = string.Empty;
try
{
string res_secondURL = accountManager.globusHttpHelper.getHtmlfromUrl(new Uri(IGGlobals.Instance.IGTestURL), "");
string user = accountManager.username;
try
{
DataSet DS = DataBaseHandler.SelectQuery("Select FollowStatus from FollowInfo where AccountHolder='" + user + "' and FollowingUser='" + url + "'", "FollowInfo");
if (DS.Tables[0].Rows.Count != 0)
{
followStatus = DS.Tables[0].Rows[0].ItemArray[0].ToString();
}
}
catch (Exception ex)
{ }
if (!(followStatus == "Followed"))
{
if (!(No_Follow_User == ClGlobul.SnapVideosCounterfollow))
{
string status = Follow(url, ref accountManager);
// Thread.Sleep(ClGlobul.hashTagDelay * 1000);
No_Follow_User++;
if (status == "Followed")
{
DataBaseHandler.InsertQuery("insert into tbl_AccountReport(ModuleName,Account_User,DateTime ,FollowerName,Status) values('" + "FollowModule" + "','" + accountManager.username + "','" + DateTime.Now + "','" + url + "','" + status + "')", "tbl_AccountReport");
GlobusLogHelper.log.Info("[ " + DateTime.Now + "] " + "[ Profile followed with url : " + url + " with User = " + user + " , " + "Count" + No_Follow_User + "]");
}
else
{
GlobusLogHelper.log.Info("[ " + DateTime.Now + "] " + "[ Profile followed with url : " + url + " with User = " + user + " , " + "Count" + No_Follow_User + " ]");
//Log("[ " + DateTime.Now + "] " + " [ " + ClGlobul.NumberOfProfilesToFollow + " profiles Unfollowed ]");
}
}
}
}
catch (Exception ex)
{
}
}
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:54,代码来源:FollowerFollowing.cs
示例10: StartAction
public void StartAction(ref InstagramUser Gram_obj)
{
try
{
lstThreadsunFollowerbackPoster.Add(Thread.CurrentThread);
lstThreadsunFollowerbackPoster.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
try
{
if(isUnFollowBack)
{
UnFollowBack(ref Gram_obj);
}
}
catch(Exception ex)
{
GlobusLogHelper.log.Error("Error: " + ex.StackTrace);
}
}
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:24,代码来源:FollowerFollowing.cs
示例11: UnFollowBack
public void UnFollowBack(ref InstagramUser Gram_Obj)
{
try
{
lstThreadsunFollowerbackPoster.Add(Thread.CurrentThread);
lstThreadsunFollowerbackPoster.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
DataSet ds = null;
int days = No_Days_To_Unfollow;
try
{
ds = Qm.SelectFollowUser("Followed", Gram_Obj.username);
DataTable firstTable = ds.Tables[0];
if(firstTable.Rows.Count==0)
{
GlobusLogHelper.log.Info("!! Inputed Days you Enter at that Days you not Follow Any user Thourgh This Bot !!");
return;
}
foreach (DataRow dRow in firstTable.Rows)
{
string following_username = dRow["FollowTime"].ToString() + "";
string follow_Username = dRow["FollowingUser"].ToString() + "";
DateTime dt = DateTime.Parse(following_username);
TimeSpan tsDays = DateTime.Now.Date.Subtract(dt.Date);
if (tsDays.TotalDays <= days)
{
lst_UnfollowUser.Add(follow_Username);
lst_UnfollowUser = lst_UnfollowUser.Distinct().ToList();
}
}
GlobusHttpHelper obj_globalus = new GlobusHttpHelper();
#region Scrape Follower
string gramfeed_user_Url = "http://www.gramfeed.com/" + Gram_Obj.username;
List<string> follower_list = new List<string>();
int count = 0;
ClGlobul.switchAccount = false;
string GramFeed_Userhit = obj_globalus.getHtmlfromUrl(new Uri(gramfeed_user_Url), "");
string client_Id = Utils.getBetween(GramFeed_Userhit, "client_id=", "&");
string Id_Url = "https://api.instagram.com/v1/users/search?q=" + Gram_Obj.username + "&client_id=" + client_Id + "&callback=jQuery183011914858664385974_1455619732855&_=1455619735024";
string Gram_Hit_second = obj_globalus.getHtmlfromUrl(new Uri(Id_Url), "");
if (string.IsNullOrEmpty(Gram_Hit_second))
{
Gram_Hit_second = obj_ChangeProxy.chnageproxyMethod(Id_Url);
}
string GramFeed_UserId = Utils.getBetween(Gram_Hit_second, "id\":", "\",").Replace(" ","").Replace("\"","");
string Follower_Url = "https://api.instagram.com/v1/users/" + GramFeed_UserId + "/followed-by?client_id=" + client_Id + "&callback=jQuery183011914858664385974_1455619732855&_=1455619735024";
stri
|
请发表评论