private async Task ExtractData_3000共通単語(DataTable data) { StringBuilder sb = new StringBuilder(); sb.Append("<html><head><title>Google</title></head><body><table>"); for (int i = 0; i < data.Rows.Count; i++) { sb.Append(data.Rows[i]["tooltipText"]); } sb.Append("</table></body</html>"); string res = sb.ToString(); await HtmlSourceCode.GetCode(res, data, HtmlSourceCode.ExtractData_3000共通単語); }
private async void btnNguphapN4_Click(object sender, EventArgs e) { int iPage = 1; string res = await GetHtmlContent(iPage, "ngu-phap-n4-sach-mimi-bai-" + iPage + ".html"); DataTable data = await HtmlSourceCode.GetCode(res, iPage, HtmlSourceCode.FindN4Nguphap); while (iPage < 18) { iPage++; res = await GetHtmlContent(iPage, "ngu-phap-n4-sach-mimi-bai-" + iPage + ".html"); DataTable data1 = await HtmlSourceCode.GetCode(res, iPage, HtmlSourceCode.FindN4Nguphap); data.Merge(data1); } OutPutExcel_N4Nguphap(data); }
private async void btnNguphapN5_Click(object sender, EventArgs e) { int iPage = 1; string res = await GetHtmlContent(iPage, "ngu-phap-tieng-nhat-n5-tong-hop.html"); DataTable data = await HtmlSourceCode.GetCode(res, iPage, HtmlSourceCode.FindN5Nguphap); while (iPage < 12) { iPage++; res = await GetHtmlContent(iPage, "ngu-phap-tieng-nhat-n5-tong-hop.html"); DataTable data1 = await HtmlSourceCode.GetCode(res, iPage, HtmlSourceCode.FindN5Nguphap); data.Merge(data1); } OutPutExcel_N5Nguphap(data); }
private async void btn共通単語_Click(object sender, EventArgs e) { int iPage = 1; string res = await GetHtmlContent(iPage, "3000-tu-vung-tieng-nhat-thong-dung.html"); DataTable data = await HtmlSourceCode.GetCode(res, iPage, HtmlSourceCode.Find3000共通単語); while (iPage < 17) { iPage++; res = await GetHtmlContent(iPage, "3000-tu-vung-tieng-nhat-thong-dung.html"); DataTable data1 = await HtmlSourceCode.GetCode(res, iPage, HtmlSourceCode.Find3000共通単語); data.Merge(data1); } await ExtractData_3000共通単語(data); OutPutExcel_3000共通単語(data); }