public static bool Analyze_NavA(ref char[] t, ref char[] key, string bhref, int count, List <ItemDataB> lid) { int s = FindCharArray(ref t, ref Key_mod_video_list, 0); if (s < 0) { return(false); } s = FindCharArray(ref t, ref key, s); ItemDataB im = new ItemDataB(); int i = 0; if (s > 0) { for (i = 0; i < count; i++) { s = FindCharArray(ref t, ref Key_href, s); string href = bhref + new string(FindCharArrayA(ref t, '\"', '\"', ref s)); im.href = href; s = FindCharArray(ref t, ref Key_title, s); im.title = new string(FindCharArrayA(ref t, '\"', '\"', ref s)); s = FindCharArray(ref t, ref Key_src, s); im.src = new string(FindCharArrayA(ref t, '\"', '\"', ref s)); im.detail = ""; s = FindCharArray(ref t, ref key, s); lid.Add(im); if (s < 0) { i++; break; } } } return(true); }
static ItemDataB GetItemData(ref char[] c_buff, int s, int e) { ItemDataB im = new ItemDataB(); s = FindCharArray(ref c_buff, ref Key_href, s); string str = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref s)); im.href = str; s = FindCharArray(ref c_buff, ref Key_lazyload, s); char[] t = FindCharArrayA(ref c_buff, '\"', '\"', ref s); if (FindCharArray(ref t, ref Key_http, 0) > -1) { im.src = new string(t); } else { im.src = "http:" + new string(t); } s = FindCharArray(ref c_buff, ref Key_alt, s); im.title = new string(FindCharArrayA(ref c_buff, '\"', '\"', ref s)); int ae = FindCharArray(ref c_buff, ref Key_a_e, s); int ss = FindCharArray(ref c_buff, ref Key_mask, s, ae); string mask = ""; if (ss > 0) { mask = new string(FindCharArrayA(ref c_buff, '>', '<', ref ss)) + "\r\n"; } ss = FindCharArray(ref c_buff, ref Key_mark, s, ae); if (ss > 0) { ss += 2; t = FindCharArrayA(ref c_buff, '\"', '\"', ref ss); if (FindCharArray(ref t, ref Key_http, 0) > -1) { im.mark = new string(t); } else { im.mark = "http:" + new string(t); } } int d = FindCharArray(ref c_buff, ref Key_figure_desc, s, e); if (d > 0) { char[] tt = FindCharArrayA(ref c_buff, '>', '<', ref d); tt = DeleteChar(ref tt, (char)9, '\r', '\n'); str = new string(tt); int end = FindCharArray(ref c_buff, ref Key_div_e, d); int o = d; for (int c = 0; c < 4; c++) { o = FindCharArray(ref c_buff, ref Key_title, o, end); if (o < 0) { break; } str += " " + new string(FindCharArrayA(ref c_buff, '\"', '\"', ref o)); } s = d; } else { str = ""; } d = FindCharArray(ref c_buff, ref Key_info_inner, s, e); if (d > 0) { str = str + "\r\n播放数:" + new string(FindCharArrayA(ref c_buff, '>', '<', ref d)); } im.detail = mask + str; return(im); }