If you feel to correct this text, do it! Any help is welcome.
I am sorry for not knowing the correct formulation for this post. I did my best.
I want to make a easy to find software for my artists that I watch(and I have 3 pages with users,approx 200) on deviantart.com.
To view a user page on that website, just formulate as this: http://q12a.deviantart.com/ (this is my account btw)
I am new to this thing, web pages decoding and re-coding into c#.
I don't know how to even begin to explain anything.
All the c# code is working fine.
Except when I run the program, [some] images from [some] users, do not want to load.
I have looked into the web page source(ctrl+u) in Firefox.
I saved the damn user page.
I "copy the value" from the string at break point in c#.
What I can observe, is that not all the text is the same, and what i mean is that:
in the source page from firefox, all the keywords are at their place, nice and clean. If I search for keyword: "data-super-img=" I can find it for every image link from that page. The same is if I download the page in htm format.
The thing is changed when I looked into "copy the value" thing.
In some areas of the text, "data-super-img=" keyword is missing !!! Why? I checked like 100 times to get this answer in the end.
For some very obscured reason, some keywords are avoided by the stream reader.
I am not accusing the stream reader of anything.
Most than probably is a thing related by php, html reading, html converting into a stream and not into a page, hell knows.
Maybe my HttpWebRequest/HttpWebResponse formula is not converting completely from the stream. maybe another formula must be used, to actually convert that stream into a html, or something. I really don't know, I just use my intuition.
I dont want to leave the impression that i spam or that i push artists in the front news. All my intention is to solve this mystery, and I will leave an example that was the most full of misbehavior's like these(not finding the correct link).
the page is from this artist- http://aeolus06.deviantart.com/gallery/
[SOME] pages behave this phenomenon,of skipping the keywords(or links) but the majority is doing fine.
Thank you.
string streamx = "", file = "";
string urlx = "", text3564 = "", codRX = "";
int i7 = 0;
public void userGallery()
{
streamx = ""; urlx = "";
urlx = "http://" + listBox1.SelectedItem.ToString().ToLower() + ".deviantart.com/gallery/";
linkLabel1.Text = urlx;
HttpWebRequest request;
HttpWebResponse response = null;
Stream stream = null;
request = (HttpWebRequest)WebRequest.Create(urlx);
request.UserAgent = "Foo";
request.Accept = "*/*";
response = (HttpWebResponse)request.GetResponse();
stream = response.GetResponseStream();
StreamReader sr = new StreamReader(stream, System.Text.Encoding.Default);
streamx = sr.ReadToEnd();
if (stream != null) stream.Close();
if (response != null) response.Close();
text3564 = streamx; codRX = urlx = ""; i7 = 0;
i7 = text3564.IndexOf("<div class=\"folderview-art\">"); text3564 = text3564.Remove(0, i7);
string st0 = "data-super-img=";
if (text3564.Contains(st0))
{
i7 = text3564.IndexOf(st0); text3564 = text3564.Remove(0, i7);
codRX = st0 + ".*?(\" )";
urlx = Regex.Match(text3564, codRX).ToString().Replace(st0, "").Replace("\"", "");
i7 = text3564.IndexOf(urlx); text3564 = text3564.Remove(0, i7 + urlx.Length);
pictureBox3.ImageLocation = urlx;
i7 = text3564.IndexOf(st0); text3564 = text3564.Remove(0, i7);
codRX = st0 + ".*?(\" )";
urlx = Regex.Match(text3564, codRX).ToString().Replace(st0, "").Replace("\"", "");
i7 = text3564.IndexOf(urlx); text3564 = text3564.Remove(0, i7 + urlx.Length);
pictureBox4.ImageLocation = urlx;
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
userGallery();
}