VK.com 용 페이지 파서를 쓰고 싶습니다. 내 문제는 페이지 소스가 50 개의 결과 만 포함하고 나머지는 페이지 끝까지 다시로드된다는 것입니다. 지금까지페이지 끝까지 도달 한 페이지의 소스를 읽으십시오.
내 코드 : 페이지의
private void syncToolStripMenuItem_Click(object sender, EventArgs e)
{
string[] information, title, artist;
int i = 0;
List<string> joint = new List<string>();
information = info_basic(webBrowser1.DocumentText);
title = info_title(information);
artist = info_artist(information);
foreach (string str in title)
{
joint.Add(artist[i] + " - " + title[i]);
i++;
}
listBox1.Items.Clear();
listBox1.Items.AddRange(joint.ToArray());
}
private string[] info_basic(string source)
{
string[] temps;
List<string> sub = new List<string>();
temps = Regex.Split(source, "<div class=\"play_btn fl_l\">");
foreach (string str in temps)
{
sub.Add(str);
}
sub.RemoveRange(0, 1);
return sub.ToArray();
}
중요 코드 :
http://csharp.bplaced.net/files/vk%20source.txt 나는 당신이 (하단 로 스크롤 할 때 vk.com에 페이지에서 트래픽을 모니터링하는 것이 좋습니다
감사합니다. 그러나 API를 통해 다른 방법으로이 작업을 수행했습니다. –