using System; using System.IO; using System.Net; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string html; string[] thread = new string[1000]; string[] newdat = new string[1000]; string[] dat = new string[1000]; string[] henkou = new string[1000]; int a = 0; int b = 0; int c = 0; int d = 0; int e = 0; bool f = false; bool shokai = false; int test = 0; while (true) { WebClient wc = new WebClient(); Stream st = wc.OpenRead("http://q...content-available-to-author-only...h.net/sec2chd//subject.txt"); Encoding enc = Encoding.GetEncoding("Shift_JIS"); StreamReader sr = new StreamReader(st, enc); html = sr.ReadToEnd(); sr.Close(); st.Close(); thread = html.Split(new char[] { '\n' }); b = 0; while (!String.IsNullOrEmpty(thread[b])) { newdat[b] = thread[b].Substring(0, thread[b].IndexOf("<>")); b++; } c = 0; d = 0; e = 0; f = false; while (!String.IsNullOrEmpty(henkou[e])) { henkou[e] = " "; e++; } while (!String.IsNullOrEmpty(newdat[c])) { while (!String.IsNullOrEmpty(dat[d])) { if (newdat[c] == dat[d]) { f = true; } d++; } if (f == false) { henkou[c] = newdat[c]; } c++; } if (shokai) { using (StreamWriter w = new StreamWriter(@"C:\Users\ハンバーガー\Desktop\糞\メモ\ちんこ\スレ一覧.txt")) { a = 0; while (!String.IsNullOrEmpty(henkou[a])) { if (henkou[a] != " ") { w.WriteLine(henkou[a]); Console.WriteLine(thread[a]); } a++; } } } Array.Copy(newdat, dat, dat.Length); Console.WriteLine("スレ一覧取得"); Console.WriteLine("----------------"); test = 0; while (!String.IsNullOrEmpty(dat[test])) { Console.WriteLine(dat[test]); test++; } System.Threading.Thread.Sleep(45000); shokai = true; } } } }