本文整理汇总了C#中BaseLib.GlobusHttpHelper.GetDataWithTagValueByTagAndAttributeNameWithClass方法的典型用法代码示例。如果您正苦于以下问题:C# GlobusHttpHelper.GetDataWithTagValueByTagAndAttributeNameWithClass方法的具体用法?C# GlobusHttpHelper.GetDataWithTagValueByTagAndAttributeNameWithClass怎么用?C# GlobusHttpHelper.GetDataWithTagValueByTagAndAttributeNameWithClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseLib.GlobusHttpHelper
的用法示例。
在下文中一共展示了GlobusHttpHelper.GetDataWithTagValueByTagAndAttributeNameWithClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StartAcceptInvitations
//.........这里部分代码省略.........
//// Iterate over all h1 tags:
Chilkat.Xml xNode = default(Chilkat.Xml);
Chilkat.Xml xBeginSearchAfter = default(Chilkat.Xml);
#endregion
#region Invitatin count
xBeginSearchAfter = null;
xNode = xml.SearchForAttribute(xBeginSearchAfter, "span", "class", "invitation-count count ");
try
{
while ((xNode != null))
{
string strvalue = xNode.AccumulateTagContent("text", "script|style");
string Invitatincount = strvalue;
Log("[ " + DateTime.Now + " ] => [ Invitation Count = " + Invitatincount + " UserName = " + _UserName + " ]");
Log("-----------------------------------------------------------------------------------------------------------------------------------");
break;
}
}
catch (Exception ex)
{
}
#endregion
do
{
newPagesource = httpHelper.getHtmlfromUrl1(new Uri("https://www.linkedin.com/inbox/invitations?keywords=&sortBy=&startRow=" + startRow + "&subFilter=&trk=&showBlocked=false"));
if (newPagesource.Contains("inbox-list"))
{
string inbox_list = httpHelper.GetDataWithTagValueByTagAndAttributeNameWithClass(newPagesource, "ol", "inbox-list ");
if (inbox_list.Contains("<li"))
{
isTrue = true;
string[] srrLi = Regex.Split(inbox_list, "<li");
foreach (string item in srrLi)
{
try
{
if (item.Contains("data-gid=\""))
{
string data_gid = item.Substring(item.IndexOf("data-gid=\"") + 10, item.IndexOf("\"", item.IndexOf("data-gid=\"") + 10) - (item.IndexOf("data-gid=\"") + 10)).Replace("\"", string.Empty).Replace("data-gid=\"", string.Empty).Trim();
int startindex1 = item.IndexOf("alt=");
string start1 = item.Substring(startindex1).Replace("alt=",string.Empty);
int endindex1 = start1.IndexOf("height");
string end1 = start1.Substring(0, endindex1).Replace("\"", string.Empty).Trim();
SenderName = end1;
string response2 = httpHelper.getHtmlfromUrl1(new Uri("http://www.linkedin.com/inbox/action?mboxItemGID=" + data_gid + "&actionType=invitationAccept&csrfToken=" + csrfToken + "&goback=%2Epiv_*1_*1_*1_*1_*1&trk=inbox-invitations-inv-accept&ctx=inbox&rnd=1366352095313"));
if (response2.Contains(" are now connected"))
{
string SuccessMsg = string.Empty;
int startindex = response2.IndexOf("<div class=\"confirmation\">");
if (startindex > 0)
{
try
{
string start = response2.Substring(startindex).Replace("<div class=\"confirmation\">", string.Empty);
int endindex = start.IndexOf("<ul>");