当前位置: 首页>>代码示例>>C#>>正文


C# GlobusHttpHelper.getHtmlfromUrl方法代码示例

本文整理汇总了C#中GlobusHttpHelper.getHtmlfromUrl方法的典型用法代码示例。如果您正苦于以下问题:C# GlobusHttpHelper.getHtmlfromUrl方法的具体用法?C# GlobusHttpHelper.getHtmlfromUrl怎么用?C# GlobusHttpHelper.getHtmlfromUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GlobusHttpHelper的用法示例。


在下文中一共展示了GlobusHttpHelper.getHtmlfromUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CheckVersion

        private void CheckVersion()
        {
            try
            {
                thisVersionNumber = GetAssemblyVersion();
                string textFileLocationOnServer = "http://licensing.facedominator.com/licensing/ID/IDCheckVer/IDLatestVersion.txt";

                GlobusHttpHelper httpHelper = new GlobusHttpHelper();
                string textFileData = httpHelper.getHtmlfromUrl(new Uri(textFileLocationOnServer));
                string verstatus = string.Empty;
                if (Globals.IsProVersion)
                {
                    verstatus = "Fdpro Version";
                }
                if (Globals.IsBasicVersion)
                {
                    verstatus = "Fdbasic Version";
                }
                else if (Globals.IsProVersion && Globals.IsBasicVersion)
                {
                    verstatus = Globals.Licence_Details.Split('&')[1];
                }

                string latestVersion = Regex.Split(textFileData, "<:>")[0];
                string updateVersionPath = Regex.Split(textFileData, "<:>")[1];

                if (thisVersionNumber == latestVersion)
                {
                    this.Dispatcher.Invoke(new Action(delegate
                    {
                        ModernDialog.ShowMessage("You have the Updated Version", "Information", btnMessage);
                    }));

                }
                else
                {
                    this.Dispatcher.Invoke(new Action(delegate
                    {
                        var check = ModernDialog.ShowMessage("An Updated Version Available - Do you Want to Upgrade!", "Update Available", btnUsed);
                        if (check.ToString().Equals("Yes"))
                        {
                            System.Diagnostics.Process.Start("iexplore", updateVersionPath);
                            this.Dispatcher.Invoke(new Action(delegate
                            {
                                this.Close();
                            }));
                        }
                    }));
                }
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
            }
        }
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:55,代码来源:MainWindow.xaml.cs

示例2: FindTheGroupUrls

		private void FindTheGroupUrls(GlobusHttpHelper chilkatHttpHelper, Dictionary<string, string> CheckDuplicates, string Username, int GetCountMember, string keyword)
		{

			try
			{
				lstThreadsGroupMemberScraper.Add(Thread.CurrentThread);
				lstThreadsGroupMemberScraper.Distinct();
				Thread.CurrentThread.IsBackground = true;
			}
			catch (Exception ex)
			{
				Console.WriteLine("Error : " + ex.StackTrace);
			}

			try
			{
				string strKeyword = keyword;
				string strGroupUrl = FBGlobals.Instance.fbfacebookSearchPhpQUrl + strKeyword + "&init=quick&type=groups";   // "https://www.facebook.com/search.php?q="
				strGroupUrl = "https://www.facebook.com/search/results/?q="+strKeyword+"&type=groups";
				string __user = "";
				string fb_dtsg = "";

				string pgSrc_FanPageSearch = chilkatHttpHelper.getHtmlfromUrl(new Uri(strGroupUrl),"","");



				__user = GlobusHttpHelper.GetParamValue(pgSrc_FanPageSearch, "user");
				if (string.IsNullOrEmpty(__user))
				{
					__user = GlobusHttpHelper.ParseJson(pgSrc_FanPageSearch, "user");
				}

				fb_dtsg = GlobusHttpHelper.GetParamValue(pgSrc_FanPageSearch, "fb_dtsg");
				if (string.IsNullOrEmpty(fb_dtsg))
				{
					fb_dtsg = GlobusHttpHelper.ParseJson(pgSrc_FanPageSearch, "fb_dtsg");
				}

				List<string> pagesList = GetGroups_FBSearch(pgSrc_FanPageSearch);


				List<string> distinctPages = pagesList.Distinct().ToList();
				foreach (string distpage in distinctPages)
				{
					try
					{
						string distpage1 = distpage.Replace("d", "groups/");
						sgroupid.Add(distpage1);
					}
					catch (Exception ex)
					{
						Console.WriteLine("Error : " + ex.StackTrace);
					}
				}
				string ajaxRequestURL = GetAjaxURL_MoreResults(pgSrc_FanPageSearch);



				List<string> list = new List<string>();
				List<string> lstLinkData = new List<string>();


				/*
				if(!String.IsNullOrEmpty(ajaxRequestURL))
				{
				ajaxRequestURL = FBGlobals.Instance.fbhomeurl + ajaxRequestURL + "&__a=1&__user=" + __user + "";   // "https://www.facebook.com/" 
				ajaxRequestURL = Uri.UnescapeDataString(ajaxRequestURL) + "&init=quick";

				string res_ajaxRequest = chilkatHttpHelper.getHtmlfromUrl(new Uri(ajaxRequestURL),"","");
				string[] Linklist = System.Text.RegularExpressions.Regex.Split(res_ajaxRequest, "href=");

				try
				{
					foreach (string itemurl in Linklist)
					{
						try
						{
							if (!itemurl.Contains("<!DOCTYPE html"))
							{
								if (!itemurl.Contains(@"http:\/\/www.facebook.com"))
								{
									lstLinkData.Add(itemurl);
									string strLink = itemurl.Substring(0, 70);

									if (strLink.Contains("group") && strLink.Contains("onclick"))
									{
										try
										{
											string[] tempArr = strLink.Split('"');
											string temp = tempArr[1];
											temp = temp.Replace("\\", "");
											temp = "https://www.facebook.com" + temp;   // "" 
											list.Add(temp);
										}
										catch (Exception ex)
										{
											Console.WriteLine("Error : " + ex.StackTrace);
										}
									}
								}
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:pinDominator-3.0,代码行数:101,代码来源:GroupManager.cs

示例3: GetCaptchaImageMulti


//.........这里部分代码省略.........
            //string lastname = string.Empty;
            //string reg_email__ = string.Empty;
            //string reg_email_confirmation__ = string.Empty;
            //string reg_passwd__ = string.Empty;
            //string sex = string.Empty;
            //string birthday_month = string.Empty;
            //string birthday_day = string.Empty;
            //string birthday_year = string.Empty;
            //string captcha_persist_data = string.Empty;
            //string captcha_session = string.Empty;
            //string extra_challenge_params = string.Empty;
            //string recaptcha_public_key = string.Empty;
            //string authp_pisg_nonce_tt = null;
            //string authp = string.Empty;
            //string psig = string.Empty;
            //string nonce = string.Empty;
            //string tt = string.Empty;
            //string time = string.Empty;
            //string challenge = string.Empty;
            //string CaptchaSummit = string.Empty;

            int intProxyPort = 80;
            Regex IdCheck = new Regex("^[0-9]*$");

            if (!string.IsNullOrEmpty(proxyPort) && IdCheck.IsMatch(proxyPort))
            {
                intProxyPort = int.Parse(proxyPort);
            }

            AddToListBox("Fetching Captcha");
            LogFacebookCreator("Fetching Captcha");
            //GlobusHttpHelper HttpHelper = new GlobusHttpHelper();  //Create new instance

            string pageSource = HttpHelper.getHtmlfromUrlProxy(new Uri("http://www.facebook.com/"), proxyAddress, intProxyPort, proxyUsername, proxyPassword);


            #region CSS, JS, & Pixel requests to avoid Socket Detection

            ///JS, CSS, Image Requests
            //RequestJSCSSIMG(pageSource, ref HttpHelper);
            RequestsJSCSSIMG.RequestJSCSSIMG(pageSource, ref HttpHelper);


            //try
            //{
            //    string req1 = HttpHelper.getHtmlfromUrl(new Uri("http://static.ak.fbcdn.net/rsrc.php/v1/yC/r/6n91uRFZJAi.js"));
            //}
            //catch (Exception)
            //{
            //}
            //try
            //{
            //    string req2 = HttpHelper.getHtmlfromUrl(new Uri("http://static.ak.fbcdn.net/rsrc.php/v1/yd/r/dpT-tcRYFZy.js"));
            //}
            //catch (Exception)
            //{
            //}

            ///Pixel request
            string reg_instanceValue = GetParamValue(pageSource, "reg_instance");
            //string asyncSignal = RandomNumberGenerator.GenerateRandom(3000, 4000).ToString();
            string asyncSignal = string.Empty;
            try
            {
                asyncSignal = RandomNumberGenerator.GenerateRandom(3000, 8000).ToString();
            }
开发者ID:prog-moh,项目名称:twtboard,代码行数:67,代码来源:FrmAccountCreatorHTTP.cs

示例4: FinishRegistrationMultiThreaded

        private void FinishRegistrationMultiThreaded(string responseRegistration, string email, string password, string proxyAddress, string proxyPort, string proxyUser, string proxyPassword, ref GlobusHttpHelper HttpHelper)
        {
            if (!string.IsNullOrEmpty(responseRegistration) && responseRegistration.Contains("registration_succeeded"))
            {
                AddToListBox("Registration Succeeded");
                try
                {
                    string res = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/c.php?email=" + email));

                    /// JS, CSS, Image Requests
                    RequestsJSCSSIMG.RequestJSCSSIMG(res, ref HttpHelper);
                }
                catch { };

                VerifiyAccountMultiThreaded(email, password, proxyAddress, proxyPort, proxyUser, proxyPassword, ref HttpHelper);
            }
            //else if (!string.IsNullOrEmpty(responseRegistration) && responseRegistration.Contains("It looks like you already have an account on Facebook"))
            else
            {
                AddToListBox("It looks like you already have an account on Facebook");
                try
                {
                    string res = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/c.php?email=" + email));

                    /// JS, CSS, Image Requests
                    RequestsJSCSSIMG.RequestJSCSSIMG(res, ref HttpHelper);
                }
                catch { };

                VerifiyAccountMultiThreaded(email, password, proxyAddress, proxyPort, proxyUser, proxyPassword, ref HttpHelper);
            }


            #region Old Code
            //else if (!string.IsNullOrEmpty(responseRegistration) && responseRegistration.Contains("The text you entered didn't match the security check"))
            //{
            //    //AddToListBox("The text you entered didn't match the security check. Retrying..");
            //    //accountCounter--;  //Decrement Counter as it'll be incremented in next line => GoToNextAccount()
            //    ////And we don't want to switch the account now
            //    //GoToNextAccount();
            //}
            //else if (!string.IsNullOrEmpty(responseRegistration) && responseRegistration.Contains("You took too much time"))
            //{
            //    //AddToListBox("You took too much time in submitting captcha. Retrying..");
            //    //accountCounter--;  //Decrement Counter as it'll be incremented in next line => GoToNextAccount()
            //    ////And we don't want to switch the account now
            //    //GoToNextAccount();
            //}
            //else if (!string.IsNullOrEmpty(responseRegistration) && responseRegistration.Contains("to an existing account"))
            //{
            //    //AddToListBox("This email is associated to an existing account");
            //    //accountCounter--;  //Decrement Counter as it'll be incremented in next line => GoToNextAccount()
            //    ////And we don't want to switch the account now
            //    //GoToNextAccount();
            //}
            //else
            //{
            //    if (retryCounter <= 2)
            //    {
            //        ////AddToListBox("Error in submitting captcha. Retrying..");
            //        //accountCounter--;  //Decrement Counter as it'll be incremented in next line => GoToNextAccount()
            //        //And we don't want to switch the account now
            //        ////GoToNextAccount();
            //    }
            //    else
            //    {
            //        //retryCounter = 0;  //Reset the retryCounter as we're switching account now
            //        //AddToListBox("Couldn't create account with " + Email + "---Switching to next account");
            //        //GoToNextAccount();
            //    }
            //} 
            #endregion
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:73,代码来源:FrmAccountCreatorHTTP.cs

示例5: ThreadPoolMethod


//.........这里部分代码省略.........
                 //       byte[] imageBytes = webClient.DownloadData(captchaSrcMulti);

                 //       //Getting Captcha Text
                 //       string captchaText = DecodeDBC(new string[] { Globals.DBCUsername, Globals.DBCPassword, "" }, imageBytes);

                 //       if (!string.IsNullOrEmpty(captchaText))
                 //       {
                 //           SummitCaptchaMulti(captchaText, ref HttpHelper, post_form_id, lsd,
                 //reg_instance,
                 //firstname,
                 //lastname,
                 //reg_email__,
                 //reg_email_confirmation__,
                 //reg_passwd__,
                 //sex,
                 //birthday_month,
                 //birthday_day,
                 //birthday_year,
                 //captcha_persist_data,
                 //captcha_session,
                 //extra_challenge_params,
                 //recaptcha_public_key,
                 //authp_pisg_nonce_tt = null,
                 //authp,
                 //psig,
                 //nonce,
                 //tt,
                 //time,
                 //challenge,
                 //CaptchaSummit);
                 //       }
                 //       else
                 //       {
                 //           AddToListBox("Captcha text NULL for : " + Email);
                 //       }

                 //   }
                 //   else if (UseDeCaptcher)
                 //   {
                 //       DownloadImageViaWebClient(captchaSrcMulti, Email.Split('@')[0]);
                 //       System.Threading.Thread.Sleep(15000);

                 //       //Getting Captcha Text using Decaptcher
                 //       string Captchatext = decaptcha(decaptchaImagePath + "\\decaptcha" + Email.Split('@')[0]);

                 //       try
                 //       {
                 //           File.Delete(decaptchaImagePath + "\\decaptcha" + Email.Split('@')[0]);
                 //       }
                 //       catch (Exception) { }


                 //       if (!string.IsNullOrEmpty(Captchatext))
                 //       {
                 //           SummitCaptchaMulti(Captchatext, ref HttpHelper, post_form_id, lsd,
                 //reg_instance,
                 //firstname,
                 //lastname,
                 //reg_email__,
                 //reg_email_confirmation__,
                 //reg_passwd__,
                 //sex,
                 //birthday_month,
                 //birthday_day,
                 //birthday_year,
                 //captcha_persist_data,
                 //captcha_session,
                 //extra_challenge_params,
                 //recaptcha_public_key,
                 //authp_pisg_nonce_tt = null,
                 //authp,
                 //psig,
                 //nonce,
                 //tt,
                 //time,
                 //challenge,
                 //CaptchaSummit);
                 //       }
                 //       else
                 //       {
                 //           AddToListBox("Captcha text NULL for : " + Email);
                 //       }
                 //   } 
                    #endregion

                    //string url_Registration = "https://www.facebook.com/ajax/register.php?__a=5&post_form_id=" + post_form_id + "&lsd=" + lsd + "&reg_instance=" + reg_instance + "&locale=en_US&terms=on&abtest_registration_group=1&referrer=&md5pass=&validate_mx_records=1&asked_to_login=0&ab_test_data=&firstname=" + firstname + "&lastname=" + lastname + "&reg_email__=" + reg_email__ + "&reg_email_confirmation__=" + reg_email_confirmation__ + "&reg_passwd__=" + reg_passwd__ + "&sex=" + sex + "&birthday_month=" + birthday_month + "&birthday_day=" + birthday_day + "&birthday_year=" + birthday_year + "&captcha_persist_data=" + captcha_persist_data + "&captcha_session=" + captcha_session + "&extra_challenge_params=" + extra_challenge_params + "&recaptcha_type=password&recaptcha_challenge_field=" + challenge + "&captcha_response=" + "" + "&ignore=captcha|pc&__user=0";
                 string url_Registration = "https://www.facebook.com/ajax/register.php?__a=4&post_form_id=" + post_form_id + "&lsd=" + lsd + "&reg_instance=" + reg_instance + "&locale=en_US&terms=on&abtest_registration_group=1&referrer=&md5pass=&validate_mx_records=1&asked_to_login=0&ab_test_data=AAAAAAAAAAAA%2FA%2FAAAAA%2FAAAAAAAAAAAAAAAAAAAA%2FAA%2FfAAfABAAD&firstname=" + firstname + "&lastname=" + lastname + "&reg_email__=" + reg_email__ + "&reg_email_confirmation__=" + reg_email_confirmation__ + "&reg_passwd__=" + reg_passwd__ + "&sex=" + sex + "&birthday_month=" + birthday_month + "&birthday_day=" + birthday_day + "&birthday_year=" + birthday_year + "&captcha_persist_data=" + captcha_persist_data + "&captcha_session=" + captcha_session + "&extra_challenge_params=" + extra_challenge_params + "&recaptcha_type=password&captcha_response=" + "" + "&ignore=captcha%7Cpc&__user=0";

                    string res_Registration = HttpHelper.getHtmlfromUrl(new Uri(url_Registration));

                    //reg_passwd__ = Uri.UnescapeDataString(reg_passwd__);

                    FinishRegistrationMultiThreaded(res_Registration, Email, Password, proxyAddress, proxyPort, proxyUsername, proxyPassword, ref HttpHelper);
                //}
            }
            catch (Exception ex)
            {
                AddToListBox(ex.Message);
            }
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:101,代码来源:FrmAccountCreatorHTTP.cs

示例6: GetUserFollowing_newComment

        public List<string> GetUserFollowing_newComment(string UserName, int NoOfPage, int FollowingCount)
        {
            List<string> TotalFollowerComment = new List<string>();
            try
            {            
                List<string> FollowerComment = new List<string>();
				GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Starting Extraction Of Following For " + UserName + " ]");
                GlobusHttpHelper objglobusHttpHelper = new GlobusHttpHelper();
                for (int i = 1; i <= 1000; i++)
                {
                    try
                    {
                        string FollowerPageSource = string.Empty;

                        if (i == 1)
                        {
                            FollowUrl = "http://pinterest.com/" + UserName + "/following/";
                            FollowerPageSource = objglobusHttpHelper.getHtmlfromUrl(new Uri(FollowUrl), referer, string.Empty, "");
                            referer = FollowUrl;
                        }
                        else
                        {
                            FollowUrl = "https://www.pinterest.com/resource/UserFollowingResource/get/?source_url=%2F" + UserName + "%2Ffollowing%2F&data=%7B%22options%22%3A%7B%22username%22%3A%22" + UserName + "%22%2C%22bookmarks%22%3A%5B%22" + bookmark + "%3D%22%5D%7D%2C%22context%22%3A%7B%7D%7D&module_path=App(module%3D%5Bobject+Object%5D)&_=144204352215" + (i - 1);

                            try
                            {
                                FollowerPageSource = objglobusHttpHelper.getHtmlfromUrlProxy(new Uri(FollowUrl), referer, "", 80, string.Empty, "", "");
                            }
                            catch
                            {
                                FollowerPageSource = objglobusHttpHelper.getHtmlfromUrlProxy(new Uri(FollowUrl), "", Convert.ToInt32(""), "", "");

                            }
                            if (FollowerPageSource.Contains("Whoops! We couldn't find that page."))
                            {
                                break;
                            }
                        }

                        ///Get App Version 
                        if (FollowerPageSource.Contains("app_version") && string.IsNullOrEmpty(AppVersion))
                        {
                            string[] ArrAppVersion = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "app_version");
                            if (ArrAppVersion.Count() > 0)
                            {
                                string DataString = ArrAppVersion[ArrAppVersion.Count() - 1];

                                int startindex = DataString.IndexOf("\": \"");
                                int endindex = DataString.IndexOf("\", \"");

                                AppVersion = DataString.Substring(startindex, endindex - startindex).Replace("\": \"", "");
                            }
                        }

                        ///get bookmarks value from page 
                        ///
                        if (FollowerPageSource.Contains("bookmarks"))
                        {
                            string[] bookmarksDataArr = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "bookmarks");

                            string Datavalue = string.Empty;
                            if (bookmarksDataArr.Count() > 2)
                                Datavalue = bookmarksDataArr[bookmarksDataArr.Count() - 2];
                            else
                                Datavalue = bookmarksDataArr[bookmarksDataArr.Count() - 1];

                            bookmark = Datavalue.Substring(Datavalue.IndexOf(": [\"") + 4, Datavalue.IndexOf("]") - Datavalue.IndexOf(": [\"") - 5);
                        }


                        try
                        {
                            if (!FollowerPageSource.Contains("No one has followed"))
                            {
                                List<string> lst = objGlobusRegex.GetHrefUrlTags(FollowerPageSource);
                                if (lst.Count == 0)
                                {
                                    lst = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "href").ToList();
                                    if (lst.Count() == 1)
                                    {
                                        lst = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "\"username\":").ToList();
                                    }
                                }
                                foreach (string item in lst)
                                {
                                    if (item.Contains("class=\"userWrapper") || item.Contains("class=\\\"userWrapper"))
                                    {
                                        try
                                        {
                                            if (item.Contains("\\"))
                                            {
                                                int FirstPinPoint = item.IndexOf("=\\\"/");
                                                int SecondPinPoint = item.IndexOf("/\\\"");
                                                User = item.Substring(FirstPinPoint, SecondPinPoint - FirstPinPoint).Replace("\"", string.Empty).Replace("\\", string.Empty).Replace("=", string.Empty).Replace("/", string.Empty).Trim();
                                            }
                                            else
                                            {
                                                int FirstPinPoint = item.IndexOf("href=");
                                                int SecondPinPoint = item.IndexOf("class=");

//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:pinDominator-3.0,代码行数:101,代码来源:CommentManagers.cs

示例7: 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";
                string GramFeed_UserFollower = obj_globalus.getHtmlfromUrl(new Uri(Follower_Url), "");
                if(string.IsNullOrEmpty(GramFeed_UserFollower))
                {
                    GramFeed_UserFollower = obj_ChangeProxy.chnageproxyMethod(Follower_Url);
                }
                string[] follower_regexlist = Regex.Split(GramFeed_UserFollower, "username");
                foreach (string item in follower_regexlist)
                {
                    if (item.Contains("profile_picture"))
                    {
                        string user_name = Utils.getBetween(item, "\":\"", "\"");
                        if (!lst_Follower_unfollowback.Contains(user_name))
                        {

                            lst_Follower_unfollowback.Add(user_name);
                            lst_Follower_unfollowback = lst_Follower_unfollowback.Distinct().ToList();
                                                                                
                        }
                        else
                        {
                            break;
                        }
                    }
                }
              
                if (GramFeed_UserFollower.Contains("next_url"))
                {
                    value = true;
                    while (value)
                    {
                        if (GramFeed_UserFollower.Contains("next_url"))
                        {
                            string hit_data = Utils.getBetween(GramFeed_UserFollower, "next_url\":\"", "\",").Replace("\u0026", "&").Replace("\\", "").Replace("u0026", "&");
                            GramFeed_UserFollower = obj_globalus.getHtmlfromUrl(new Uri(hit_data), "");
                            string[] follower_regexlist2 = Regex.Split(GramFeed_UserFollower, "username");
                            foreach (string item in follower_regexlist2)
                            {
                                if (item.Contains("profile_picture"))
                                {
                                    string user_name = Utils.getBetween(item, "\":\"", "\"");
                                    if (!lst_Follower_unfollowback.Contains(user_name))
                                    {
                                        lst_Follower_unfollowback.Add(user_name);
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:101,代码来源:FollowerFollowing.cs

示例8: UserPins_Repin

        public List<string> UserPins_Repin(string UserName, ref PinInterestUser objPinUser)
        {
            List<string> lstUsernamePin = new List<string>();
            try
            {
                GlobusRegex objGlobusRegex = new GlobusRegex();
                GlobusHttpHelper objglobusHttpHelper = new GlobusHttpHelper();
				GlobusLogHelper.log.Info("[ " + DateTime.Now + "] => [ Start Getting Pins For this User " + UserName + " ]");
                string UserPins = string.Empty;
               
                if (UserName.Contains("pinterest.com"))
                {
                    UserUrl = UserName;
                    UserPins = UserName + "pins/";
                }
                else
                {
                    UserUrl = "https://pinterest.com/" + UserName + "/";
                    UserPins = "https://pinterest.com/" + UserName + "/pins/";
                }

                try
                {
                    UserPageSource = objglobusHttpHelper.getHtmlfromUrl(new Uri(UserUrl), "http://pinterest.com/", string.Empty, objPinUser.UserAgent);
                    UserPinPageSource = objglobusHttpHelper.getHtmlfromUrl(new Uri(UserPins), UserUrl, string.Empty, objPinUser.UserAgent);
                }
                catch (Exception ex)
                {
                }
                List<string> lst = objGlobusRegex.GetHrefUrlTagsForPinDescription(UserPinPageSource);
                lst = lst.Distinct().ToList();
                string PinUrl = string.Empty;

                foreach (string item in lst)
                {
                    try
                    {
                        if (item.Contains("/pin/"))
                        {
                            if (!item.Contains("/pin/A"))
                            {
                                try
                                {
                                    int FirstPinPoint = item.IndexOf("/pins/");
                                    int SecondPinPoint = item.IndexOf("class=");									                               
                                    PinUrl = Utils.Utils.getBetween(item, "/pin/", "/\" class=");
                                    if (!string.IsNullOrEmpty(PinUrl))
                                    {
                                        lstUsernamePin.Add(PinUrl);
                                    }
                                }
                                catch (Exception ex)
                                {
                                    PinUrl = item.Replace("/pins/", "");
                                    lstUsernamePin.Add(PinUrl);
                                }
                            }
                        }
                    }
                    catch (Exception ex)
                    {

                    }
                }
                lstUsernamePin = lstUsernamePin.Distinct().ToList();
                lstUsernamePin.Reverse();

				GlobusLogHelper.log.Info("[ " + DateTime.Now + "] => [ Total Pin Urls Collected " + lstUsernamePin.Count + " ]");
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }

            return lstUsernamePin;
        }
开发者ID:sumitglobussoft,项目名称:pinDominator-3.0,代码行数:76,代码来源:RePinManager.cs

示例9: ScrapeProfileDetails

        public void ScrapeProfileDetails(ref GlobusHttpHelper objHttpHelper, List<string> ProfileUrls)
        {
            foreach (string profileURL in ProfileUrls)
            {
                try
                {
                    CheckDuplicate.Add(profileURL, profileURL);
                }
                catch (Exception)
                {
                    continue;
                }

                string name = string.Empty;
                string memberID = string.Empty;
                string imageUrl = string.Empty;
                string connection = string.Empty;
                string location = string.Empty;
                string industry = string.Empty;
                string headlineTitle = string.Empty;
                string currentTitle = string.Empty;
                string pastTitles = string.Empty;
                string currentCompany = string.Empty;
                string pastCompanies = string.Empty;
                string skills = string.Empty;
                string numberOfConnections = string.Empty;
                string education = string.Empty;
                string email = string.Empty;
                string phoneNumber = string.Empty;
                //if (SalesNavigatorGlobals.isStop)
                //{
                //    return;
                //}
                try
                {
                    GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Scraping profile details of profile url : " + profileURL + " ]");

                    string pgSource = objHttpHelper.getHtmlfromUrl(new Uri(profileURL));
                    if (string.IsNullOrEmpty(pgSource))
                    {
                        pgSource = objHttpHelper.getHtmlfromUrl(new Uri(profileURL));
                    }
                    if (!pgSource.Contains("\"profile\":"))
                    {
                        Thread.Sleep(2000);
                        pgSource = objHttpHelper.getHtmlfromUrl(new Uri(profileURL));
                    }

                    name = GetName(pgSource);

                    memberID = Utils.getBetween(profileURL, "profile/", ",").Trim();

                    imageUrl = GetImageUrl(pgSource);

                    email = GetEmail(pgSource);

                    phoneNumber = GetPhoneNumber(pgSource);

                    connection = GetConnection(pgSource);

                    location = GetLocation(pgSource);

                    industry = GetIndustry(pgSource);

                    headlineTitle = GetHeadlineTitle(pgSource);

                    headlineTitle = headlineTitle.Replace("\\u002d", string.Empty);

                    string allTitles = GetAllTitle(pgSource).Replace("d/b/a", string.Empty).Replace("&amp;", string.Empty); //title at company : title at company : title at company

                    try
                    {
                        string[] titles = Regex.Split(allTitles, " : ");

                        currentTitle = Utils.getBetween(titles[0], "", " at ");

                        foreach (string item in titles)
                        {
                            if (string.IsNullOrEmpty(pastTitles))
                            {
                                pastTitles = Utils.getBetween(item, "", " at ");
                            }
                            else
                            {
                                pastTitles = pastTitles + ":" + Utils.getBetween(item, "", " at ");
                            }
                        }


                        currentCompany = Utils.getBetween(titles[0] + "@", " at ", "@").Replace("d/b/a", string.Empty);

                        foreach (string item in titles)
                        {
                            if (string.IsNullOrEmpty(pastCompanies))
                            {
                                pastCompanies = Utils.getBetween(item + "@", " at ", "@").Replace("d/b/a", string.Empty);
                            }
                            else
                            {
                                if (!pastCompanies.Contains(Utils.getBetween(item + "@", " at ", "@")))
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:101,代码来源:SalesNavigator.cs

示例10: Pagination

        public void Pagination(ref GlobusHttpHelper objHttpHelper, string mainUrl)
        {
            int PageCunt = 1;
            try
            {
                string totalResults = string.Empty;
                bool dispTotalResults = true;
                string mainPageResponse = string.Empty;
                int paginationCounter = 0;
                do
                {
                    //mainUrl = mainUrl.Replace("replaceVariableCounter", paginationCounter.ToString());

                    //if (SalesNavigatorGlobals.isStop)
                    //{
                    //    return;
                    //}

                    ///string hoMEuRL = "https://www.linkedin.com/sales/search/?facet=N&facet.N=O&facet=G&facet.G=in:7350&facet=I&facet.I=96&facet=FA&facet.FA=12&defaultSelection=false&start=0&count=10&searchHistoryId=1540160093&keywords=ITIL&trk=lss-search-tab";
                    // string Url = mainUrl.Replace("replaceVariableCounter", paginationCounter.ToString());
                    mainPageResponse = objHttpHelper.getHtmlfromUrl(new Uri(mainUrl));
                    if (string.IsNullOrEmpty(mainPageResponse))
                    {
                        mainPageResponse = objHttpHelper.getHtmlfromUrl1(new Uri("https://www.linkedin.com/sales/?trk=nav_responsive_sub_nav_upgrade"));
                        mainPageResponse = objHttpHelper.getHtmlfromUrl(new Uri(mainUrl));
                    }

                    //if (mainPageResponse.Contains("We'll be back soon.")&&(mainPageResponse.Contains("We're getting things cleaned up.")))
                    //{
                    //    string unwatedStr = "https://www.linkedin.com/sales/search/?facet=N&facet.N=O&facet=G&facet.G=in:7350&facet=I&facet.I=96&facet=FA&facet.FA=12&defaultSelection=false&start=0&count=10&searchHistoryId=1540160093&keywords="+""+"&trk=lss-search-tab";// "&countryCode=" + Utils.getBetween(mainUrl, "&countryCode=", "&");
                    //    mainPageResponse = objHttpHelper.getHtmlfromUrl(new Uri(mainUrl.Replace(unwatedStr, paginationCounter.ToString())));
                    //}


                    if (string.IsNullOrEmpty(mainPageResponse))
                    {
                        if (string.IsNullOrEmpty(mainPageResponse))
                        {
                            //MessageBox.Show("Null response from internet. Please check your internet connection and restart the software.");
                            GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ No response from internet. Please check your internet connection. ] ");
                        }
                        Thread.Sleep(2000);
                        mainPageResponse = objHttpHelper.getHtmlfromUrl(new Uri(mainUrl.Replace("replaceVariableCounter", paginationCounter.ToString())));

                    }
                    try
                    {
                        if (dispTotalResults)
                        {
                            totalResults = Utils.getBetween(mainPageResponse, "\"total\":", ",\"").Trim();
                            GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Total results found : " + totalResults + " ]");
                            GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Scraping profile Url ]");
                            dispTotalResults = false;
                        }
                    }
                    catch
                    { }
                    int checkCountUrls = 0;
                    string[] profileUrl_Split = Regex.Split(mainPageResponse, "\"profileUrl\"");
                    List<string> ProfileList = new List<string>();
                    foreach (string profileUrlItem in profileUrl_Split)
                    {
                        if (!profileUrlItem.Contains("<!DOCTYPE"))
                        {
                            checkCountUrls++;
                            string profileUrl = Utils.getBetween(profileUrlItem, ":\"", "\",\"");
                            lstProfileUrls.Add(profileUrl);
                            GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Scraped Url : " + profileUrl + " ] ");
                            ProfileList.Add(profileUrl);

                        }
                    }
                    Thread.Sleep(1000);
                    ScrapeProfileDetails(ref objHttpHelper, ProfileList);
                    int startindex = paginationCounter;
                    paginationCounter = paginationCounter + 100;
                    mainUrl = CreatePaginationUrl(mainUrl, startindex, paginationCounter);
                } while (mainPageResponse.Contains("\"profileUrl\":\""));
            }
            catch (Exception ex)
            {
            }
        }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:83,代码来源:SalesNavigator.cs

示例11: FromName

        public string FromName(ref GlobusHttpHelper HttpHelper)
        {
            try
            {
                string FromNm = string.Empty;

                string pageSource = HttpHelper.getHtmlfromUrl(new Uri("http://www.linkedin.com/profile/edit?trk=nav_responsive_sub_nav_edit_profile"));

                string[] RgxGroupData = System.Text.RegularExpressions.Regex.Split(pageSource, "fmt_full_display_name");


                foreach (var fromname in RgxGroupData)
                {
                    if (fromname.Contains("\":\""))
                    {
                        try
                        {
                            if (!(fromname.Contains("<!DOCTYPE html>")))
                            {
                                try
                                {
                                    int StartIndex = fromname.IndexOf("\":\"");
                                    string start = fromname.Substring(StartIndex);
                                    int endIndex = start.IndexOf("i18n_optional_not_pinyin");
                                    FromNm = start.Substring(0, endIndex).Replace("\"", string.Empty).Replace("\":\"", string.Empty);
                                    FromNam = FromNm.Split(',')[0].Replace(":", string.Empty).Replace("\\u002d", "-");
                                }
                                catch
                                { }
                                try
                                {
                                    if (string.IsNullOrEmpty(FromNm) || FromNm.Contains("LastName"))
                                    {
                                        int StartIndex = fromname.IndexOf("\":\"");
                                        string start = fromname.Substring(StartIndex);
                                        int endIndex = start.IndexOf(",");
                                        FromNm = start.Substring(0, endIndex).Replace("\"", string.Empty).Replace("\":\"", string.Empty);
                                        FromNam = FromNm.Split(',')[0].Replace(":", string.Empty);
                                    }
                                }
                                catch
                                { }
                            }
                        }
                        catch { }
                    }
                }



                return FromNam;


            }
            catch (Exception ex)
            {
                return FromNam;
            }



        }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:62,代码来源:MessageGroupMember.cs

示例12: FromEmailCodeMsgGroupMem

        public string FromEmailCodeMsgGroupMem(ref GlobusHttpHelper HttpHelper, string gid)
        {
            string FromId = string.Empty;
            string pageSource = string.Empty;
            string[] RgxGroupData = new string[] { };
            List<string> lstpasttitle = new List<string>();
            List<string> checkpasttitle = new List<string>();
            string GroupName = string.Empty;
            string csrfToken = string.Empty;
            string[] RgxSikValue = new string[] { };
            string[] RgxPageNo = new string[] { };
            string sikvalue = string.Empty;


            try
            {
                string pageSource1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.linkedin.com/home?trk=hb_tab_home_top"));

                if (pageSource1.Contains("csrfToken"))
                {
                    csrfToken = pageSource1.Substring(pageSource1.IndexOf("csrfToken"), 50);
                    string[] Arr = csrfToken.Split('>');
                    csrfToken = Arr[0];
                    csrfToken = csrfToken.Replace(":", "%3A").Replace("csrfToken", "").Replace("\"", string.Empty).Replace("value", string.Empty).Replace("cs", string.Empty).Replace("id", string.Empty).Replace("=", string.Empty).Replace("\n", string.Empty).Replace(">", string.Empty).Replace("<script src", string.Empty);
                    csrfToken = csrfToken.Trim();
                }

                pageSource = HttpHelper.getHtmlfromUrl(new Uri("http://www.linkedin.com/groups?viewMembers=&gid=" + gid));
                RgxSikValue = System.Text.RegularExpressions.Regex.Split(pageSource, "sik");

                try
                {
                    sikvalue = RgxSikValue[1].Split('&')[0].Replace("=", string.Empty);
                }
                catch { }

                try
                {
                    if (NumberHelper.ValidateNumber(sikvalue))
                    {
                        sikvalue = sikvalue.Split('\"')[0];
                    }
                    else
                    {
                        sikvalue = sikvalue.Split('\"')[0];
                    }
                }
                catch
                {
                    sikvalue = sikvalue.Split('\"')[0];
                }


                string getdata = "http://www.linkedin.com/groups?viewMembers=&gid=" + gid + "&sik=" + sikvalue + "&split_page=1";
                pageSource = HttpHelper.getHtmlfromUrl(new Uri(getdata));
                RgxGroupData = System.Text.RegularExpressions.Regex.Split(pageSource, "name=\"fromEmail\"");

                try
                {
                    FromId = RgxGroupData[1].Split('=')[1];
                    FromId = FromId.Replace("id", string.Empty).Replace("\"", string.Empty).Trim().ToString();
                }
                catch { }
            }
            catch
            {
                return FromId;
            }


            return FromId;
        }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:72,代码来源:MessageGroupMember.cs

示例13: PostFinalMsgGroupMember_1By1

        public void PostFinalMsgGroupMember_1By1(ref GlobusHttpHelper HttpHelper, Dictionary<string, string> SlectedContacts, List<string> GrpMemSubjectlist, List<string> GrpMemMessagelist, string msg, string body, string UserName, string FromemailId, string FromEmailNam, string SelectedGrpName, string grpId, bool mesg_with_tag, bool msg_spintaxt, int mindelay, int maxdelay, bool preventMsgSameGroup, bool preventMsgWithoutGroup, bool preventMsgGlobal)
        {
            try
            {
               // MsgGroupMemDbManager objMsgGroupMemDbMgr = new MsgGroupMemDbManager();

                string postdata = string.Empty;
                string postUrl = string.Empty;
                string ResLogin = string.Empty;
                string csrfToken = string.Empty;
                string sourceAlias = string.Empty;
                string ReturnString = string.Empty;
                string PostMsgSubject = string.Empty;
                string PostMsgBody = string.Empty;
                string FString = string.Empty;

                try
                {


                    string MessageText = string.Empty;
                    string PostedMessage = string.Empty;
                    string senderEmail = string.Empty;
                    string getComposeData = HttpHelper.getHtmlfromUrl(new Uri("https://www.linkedin.com/inbox/compose"));


                    if (!getComposeData.Contains("There was an error with the file upload. Please try again later."))
                    {
                        #region MyRegion
                        try
                        {
                            int startindex = getComposeData.IndexOf("\"senderEmail\" value=\"");
                            if (startindex < 0)
                            {
                                startindex = getComposeData.IndexOf("\"senderEmail\",\"value\":\"");
                            }
                            string start = getComposeData.Substring(startindex).Replace("\"senderEmail\" value=\"", string.Empty).Replace("\"senderEmail\",\"value\":\"", string.Empty);
                            int endindex = start.IndexOf("\"/>");
                            if (endindex < 0)
                            {
                                endindex = start.IndexOf("\",\"");
                            }
                            string end = start.Substring(0, endindex).Replace("\"/>", string.Empty).Replace("\",\"", string.Empty);
                            senderEmail = end.Trim();
                        }
                        catch (Exception ex)
                        {
                            senderEmail = Utils.getBetween(getComposeData, "<", ">");
                        }
                        string pageSource = HttpHelper.getHtmlfromUrl(new Uri("https://www.linkedin.com/home?trk=hb_tab_home_top"));
                        if (pageSource.Contains("csrfToken"))
                        {
                            try
                            {
                                csrfToken = pageSource.Substring(pageSource.IndexOf("csrfToken"), 50);
                                string[] Arr = csrfToken.Split('<');
                                csrfToken = Arr[0];
                                csrfToken = csrfToken.Replace("csrfToken", "").Replace("\"", string.Empty).Replace("value", string.Empty).Replace("cs", string.Empty).Replace("id", string.Empty).Replace("=", string.Empty).Replace("\n", string.Empty).Replace(">", string.Empty).Replace("<script typ", string.Empty);
                                csrfToken = csrfToken.Trim();
                            }
                            catch (Exception ex)
                            {

                            }

                        }

                        if (pageSource.Contains("sourceAlias"))
                        {
                            try
                            {
                                sourceAlias = pageSource.Substring(pageSource.IndexOf("sourceAlias"), 100);
                                string[] Arr = sourceAlias.Split('"');
                                sourceAlias = Arr[2];
                            }
                            catch (Exception ex)
                            {

                            }
                        }

                        if (pageSource.Contains("goback="))
                        {
                            try
                            {
                            }
                            catch (Exception ex)
                            {

                            }
                        }

                        foreach (KeyValuePair<string, string> itemChecked in SlectedContacts)
                        {
                            try
                            {
                                DataSet ds = new DataSet();
                                DataSet ds_bList = new DataSet();
                                string ContactName = string.Empty;
                                string Nstring = string.Empty;
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:101,代码来源:MessageGroupMember.cs

示例14: GetGroupNames

        public Dictionary<string, string> GetGroupNames(ref GlobusHttpHelper HttpHelper, string user)
        {
            try
            {
              //  string url = "https://www.linkedin.com/profile/mappers?x-a=my_profile_follow%2Cmy_profile_groups&x-p=my_profile_summary_upsell%2EsummaryUpsell%3Atrue%2Cmy_profile_top_card%2Etc%3Atrue%2Cmy_profile_top_card%2EprofileContactsIntegrationStatus%3A0&x-oa=bottomAliases&id=327385798&locale=&snapshotID=&authToken=&authType=&invAcpt=&promoId=&notContactable=&primaryAction=&isPublic=false&sfd=false&_=1448346384101";
                string url = "https://www.linkedin.com";

                string pageSource = HttpHelper.getHtmlfromUrl(new Uri(url));

                string[] arr = Regex.Split(pageSource, "<h3>");
                string profId = Utils.getBetween(arr[2], "<a href=\"", "\"");
                pageSource = HttpHelper.getHtmlfromUrl(new Uri(profId));


                if (pageSource == "" || pageSource.Contains("Make sure you have cookies and Javascript enabled in your browser before signing in") || pageSource.Contains("manual_redirect_link"))
                {
                    Thread.Sleep(2000);
                    pageSource = HttpHelper.getHtmlfromUrl(new Uri("http://www.linkedin.com/myGroups?trk=nav_responsive_sub_nav_groups"));
                }

                if (pageSource == "" || pageSource.Contains("Make sure you have cookies and Javascript enabled in your browser before signing in") || pageSource.Contains("manual_redirect_link"))
                {
                    Thread.Sleep(2000);
                    pageSource = HttpHelper.getHtmlfromUrl(new Uri("http://www.linkedin.com/grp/"));
                }

                if (pageSource == "" || pageSource.Contains("Make sure you have cookies and Javascript enabled in your browser before signing in") || pageSource.Contains("manual_redirect_link"))
                {
                    Thread.Sleep(2000);
                    pageSource = HttpHelper.getHtmlfromUrl(new Uri("http://www.linkedin.com/myGroups?trk=nav_responsive_sub_nav_groups"));
                }

                if (pageSource.Contains("Your Groups") && pageSource.Contains("You may be interested in"))
                {
                    string[] RgxGroupData = Regex.Split(pageSource, "h3 class=\"title\"");
                    foreach (var GrpName in RgxGroupData)
                    {
                        string groupName = Utils.getBetween(GrpName, ">", "</h3>");
                        groupName = groupName + ":" + user;
                    }
                }
                if (pageSource.Contains("media-block has-activity"))
                {
                    string[] RgxGroupData = Regex.Split(pageSource, "media-content");

                    foreach (var GrpName in RgxGroupData)
                    {
                        string endName = string.Empty;
                        string endKey = string.Empty;

                        try
                        {
                            if (GrpName.Contains("<!DOCTYPE html>") || GrpName.Contains("Membership Pending"))
                            {
                                continue;
                            }

                            if (GrpName.Contains("<a href=\"/groups/") || (GrpName.Contains("<a href=\"/groups?")))
                            {
                                if ((GrpName.Contains("public")))
                                {
                                    try
                                    {
                                        int startindex = GrpName.IndexOf("class=\"public\"");
                                        string start = GrpName.Substring(startindex);
                                        int endIndex = start.IndexOf("</a>");
                                        endName = start.Substring(0, endIndex).Replace("title", string.Empty).Replace("=", string.Empty).Replace(">", string.Empty).Replace("groups", string.Empty).Replace("/", string.Empty).Replace("\"", string.Empty).Replace("&amp;", "&").Replace("classpublic", string.Empty).Replace("&quot;", "'").Replace(":", ";").Replace("This is an open group", string.Empty);
                                        endName = endName.Replace("&amp;", "&") + "^" + user;
                                    }
                                    catch (Exception ex)
                                    {
                                        GlobusLogHelper.log.Info("Exception: " + ex);
                                    }

                                    try
                                    {
                                        endKey = "";
                                        int startindex1 = GrpName.IndexOf("group");
                                        string start1 = GrpName.Substring(startindex1);
                                        int endIndex1 = start1.IndexOf("?");
                                        endKey = start1.Substring(0, endIndex1).Replace("groups", string.Empty).Replace("/", string.Empty).Replace("<a href=", string.Empty).Replace("\"", string.Empty);

                                        if (endKey == string.Empty)
                                        {
                                            startindex1 = GrpName.IndexOf("gid=");
                                            start1 = GrpName.Substring(startindex1);
                                            endIndex1 = start1.IndexOf("&");
                                            endKey = start1.Substring(0, endIndex1).Replace("gid=", string.Empty).Trim();

                                            if (!NumberHelper.ValidateNumber(endKey))
                                            {
                                                try
                                                {
                                                    endKey = endKey.Split('\"')[0];
                                                }
                                                catch { }
                                            }
                                        }
                                    }
                                    catch (Exception ex)
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:101,代码来源:MessageGroupMember.cs

示例15: AddSpecificGroupUser


//.........这里部分代码省略.........
            string LDS_CurrentTitle = string.Empty;
            string LDS_Experience = string.Empty;
            string LDS_UserContact = string.Empty;
            string LDS_PastTitles = string.Empty;
            string LDS_BackGround_Summary = string.Empty;
            string LDS_Desc_AllComp = string.Empty;
            string Company = string.Empty;
            List<string> lstpasttitle = new List<string>();
            List<string> checkpasttitle = new List<string>();
            string csrfToken = string.Empty;
            string pageSource = string.Empty;
            string[] RgxSikValue = new string[] { };
            string[] RgxPageNo = new string[] { };
            string sikvalue = string.Empty;
            int pageno = 25;
            int counter = 0;

            string group_Url = string.Empty;
            string pagination_url = string.Empty;

            string groupId = string.Empty;
            string UserID = string.Empty;

            #endregion


            try
            {
                HttpHelper = objLinkedinUser.globusHttpHelper;
                UserID = objLinkedinUser.username;
                GroupSpecMem.Clear();
                GroupName = gid.Split('^')[0];
                groupId = gid.Split(':')[1];
                string pageSource1 = HttpHelper.getHtmlfromUrl(new Uri("https://www.linkedin.com/home?trk=hb_tab_home_top"));

                if (pageSource1.Contains("csrfToken"))
                {
                    csrfToken = pageSource1.Substring(pageSource1.IndexOf("csrfToken"), 50);
                    string[] Arr = csrfToken.Split('>');
                    csrfToken = Arr[0];
                    csrfToken = csrfToken.Replace(":", "%3A").Replace("csrfToken", "").Replace("\"", string.Empty).Replace("value", string.Empty).Replace("cs", string.Empty).Replace("id", string.Empty).Replace("=", string.Empty).Replace("\n", string.Empty).Replace(">", string.Empty).Replace("<script src", string.Empty);
                    csrfToken = csrfToken.Trim();
                }



                for (int i = 1; i <= pageno; i++)
                {
                    counter++;

                    string[] RgxGroupData = new string[] { };

                    #region with group search
                    if (WithGroupSearch == true)
                    {

                        string txid = (UnixTimestampFromDateTime(System.DateTime.Now) * 1000).ToString();

                        if (counter == 1)
                        {

                            //  pageSource = HttpHelper.getHtmlfromUrl(new Uri("http://www.linkedin.com/groups?viewMembers=&gid=" + gid.Split(':')[2]));

                            pageSource = HttpHelper.getHtmlfromUrl(new Uri("https://www.linkedin.com/groups?viewMembers=&gid=" + gid.Split(':')[1]));

                            string Gid = string.Empty;
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:67,代码来源:MessageGroupMember.cs


注:本文中的GlobusHttpHelper.getHtmlfromUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。