I want to copy one value from another website, which is in th
and anchor
tag. I want to store this value in my application, I'm able to get h3/h2 data but not <a>
data.
below is the html/f12 of other website. from this i want to extract 1,945 which is in bottom anchor.
<tr class="zebra">
<th>Total Backlinks</th>
<td>
<span class="tooltip-from-element" data-tooltip-position="lefttop" data-target-position="rightmiddle" data-tooltip-id="tooltip_overview_total_backlinks" name="total_backlinks">
<a onclick="ClearInfoAndDataTable();" href="/xyz.com?target=www.homeocare.in">1,945</a>
</span>
</td>
</tr>
I'm using this code to get that data:
string url = txthack.Text.Trim();
string strurl = "https://mywebsitedomains?target= " + url + ""; //&warning=0&profile=css2";
StreamReader stream = objm.URLServerRequest(strurl);
string myResponse = stream.ReadToEnd();
MatchCollection AltTag = Regex.Matches(myResponse, "(<h3.*?>)(.*?)(</h3>)", RegexOptions.IgnoreCase | RegexOptions.Multiline);
string s = AltTag[1].ToString();