private string getOutputFileName(int pageIdx) { string filename = null; if (m_strHtml != null && m_strHtml != "") { ZHtmlParser pr = new ZHtmlParser(m_strHtml); Entry entry = new Entry(pr); entry.xpath = "//*[@id=\"con01-0\"]/div[2]/div[2]/p/text()"; string[] values = entry.val.Split(' '); string fex = values[0]; filename = string.Format("{0}\\{1}.{2}.{3}", _SINAHUANGDAOBOOK_DIR_, _OUTFILE_PREFIX_, fex, "html"); } else { filename = string.Format("{0}\\{1}.{2}.{3}", _SINAHUANGDAOBOOK_DIR_, _OUTFILE_PREFIX_, pageIdx, "html"); } return filename; }
private string getOutputFileName(int pageIdx) { // return string.Format("{0}\\{1}.{2}", _BIRTHDAYBOOK_DIR_, i, Path.GetFileName(Path.GetTempFileName())); string filename = null; if (m_strHtml != null && m_strHtml != "") { ZHtmlParser pr = new ZHtmlParser(m_strHtml); Entry entry = new Entry(pr); entry.xpath = "//*[@id=\"wrap\"]/h3/text()"; filename = string.Format("{0}\\{1}.{2}.{3}", _MONTHDAYBOOK_DIR_, _OUTFILE_PREFIX_, entry.val, "html"); } else { filename = string.Format("{0}\\{1}.{2}.{3}", _MONTHDAYBOOK_DIR_, _OUTFILE_PREFIX_, pageIdx, "html"); } return filename; }