웹 페이지의 콘텐츠 (html)에서 (scanf (C에서) 및 스캐너 클래스 (html)로) 어떻게 스캔하고 내 입력 용으로 사용합니까? 프로그램?웹 페이지를 C# 프로젝트의 입력으로 사용
string[] line = new string[length];
for (int i = 0; i < line.Length; i++) {
line[i] = Console.ReadLine();
//Can I have ReadLine read from a website not the Console?
}
나는 버스 근처의 스케줄을 포함하는 텍스트 파일을 웹 서버에 올려 놓고이 파일에 액세스하여 응용 프로그램의 출력을 생성하려고합니다. 이 방법으로 업데이트하고 항상이 업데이트에 액세스 할 수 있습니다.
P. 저는 처음 프로그래머이자 특히 C# 프로그래머가 되었기 때문에 무엇을 찾고 있는지 찾는 데 어려움을 겪고 있습니다. 도움을
감사합니다 : 나는 옳은 일을 검색 할 수 있었고이 일 :
class MainClass
{
public static void Main (string[] args)
{
// Create web client.
WebClient client = new WebClient();
// Download string.
string value = client.DownloadString("http://www.example.com");
// Write values.
Console.WriteLine("--- WebClient result ---");
Console.WriteLine(value.Length);
Console.WriteLine(value);
}
}
검색어 : "웹 스크래핑"및 "C# WebClient 다운로드". 조사를하고 샘플 코드로 구체적인 질문을하십시오. –