private void previewButton_Click(object sender, EventArgs e) { WebSiteSetting ws = WebsiteInfo.websiteList.Find(s => s.siteName == siteComboBox.Text); //System.Diagnostics.Process.Start(ws.websiteConverter.urlConvert(urlTextBox.Text, imgTypeTextBox.Text, 1)); string myUrl = WebSiteConverter.getUrl(urlPatTextBox.Text, _1stUrlTextBox.Text, urlTextBox.Text, imgTypeTextBox.Text, 1); System.Diagnostics.Process.Start(myUrl); }
private string[] fetchContentPageUrl(string domain, string imgType, long pageIndex) { //string myUrl = MyWebsiteConverter.urlConvert(domain, imgType, pageIndex); //得出url string myUrl = WebSiteConverter.getUrl(ws.urlPattern, ws.firstPageUrlPattern, ws.domain, ws.imgType, pageIndex); string myHtml = MyHttp.getHtml(myUrl, out cookies); //获取html //string[] myContentPageUrl = MyWebsiteConverter.pageReg(myHtml); //获取页面链接 string[] myContentPageUrl = WebSiteConverter.pageReg(myHtml, ws.pageRegex); return(myContentPageUrl); }