Okay so alittle while ago I decided I wanted to write a program that would read in data from a website (the HTML data) and then use it from there (long story short I was to read in a list of urls, then access each of those and gather data from them).
So I used a code I copied from the web and tweaked
public void gatherWebsiteDate (string input)
{
string urlAddress = input;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlAddress);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
if (response.StatusCode == HttpStatusCode.OK)
{
Stream receiveStream = response.GetResponseStream();
StreamReader readStream = null;
if (response.CharacterSet == null)
{
readStream = new StreamReader(receiveStream);
}
else
{
readStream = new StreamReader(receiveStream, Encoding.GetEncoding(response.CharacterSet));
}
string data = readStream.ReadToEnd();
richTextBox1.Text = data;
response.Close();
readStream.Close();
}
}
Then I ran my code, and while it did read the HTML data of the page it refuses to read the data I want.
Here's a page I would read the data from
http://uc.worldoftanks.com/uc/clans/1000000954-SAC/
Once on this page you see there are a list of members, by clicking on their name you can then got to their profile page and see data about the player (in this case I wanted to gather a clan's data and what tanks each member has used, I would use the collection or URLs to view their profile page and collect this data).
The data I am looking for just won't show up.
The HTML code looks like this
<tbody id="member_table_container">
<tr class="js-template js-hidden">
<td class="number t-number"></td>
<td class="name t-name b-user"></td>
<td class="role js-role"></td>
<td class="member_since"></td>
</tr>
<tr class="odd clan-role-recruit">
<td class="number t-number">1</td>
<td class="name t-name b-user js-rendered-template"><a href="/uc/accounts/1001157039-afbrad/">afbrad</a></td>
<td class="role js-role js-rendered-template">Recruit</td>
<td class="member_since js-rendered-template">16.08.2011</td>
but all I get is
<tbody id="member_table_container">
<tr class="js-template js-hidden">
<td class="number t-number"></td>
<td class="name t-name b-user"></td>
<td class="role js-role"></td>
<td class="member_since"></td>
For some reason it doesn't copy over any of the users data, it just doesn't see it. I have no clue why it's doing this, but this is what I need the program to do. No it's not hidden if I log out I can still view all the clan data fine, so it's not limited to log in credentials.
Hopefully this makes sense, I kind of am having trouble finding my words today, but hopefully someone can help me out here