fork download
  1. using System;
  2. using System.IO;
  3. using System.Net;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. string html;
  13. string[] thread = new string[1000];
  14. string[] newdat = new string[1000];
  15. string[] dat = new string[1000];
  16. string[] henkou = new string[1000];
  17. int a = 0;
  18. int b = 0;
  19. int c = 0;
  20. int d = 0;
  21. int e = 0;
  22. bool f = false;
  23. bool shokai = false;
  24. int test = 0;
  25.  
  26. while (true)
  27. {
  28. WebClient wc = new WebClient();
  29.  
  30. Stream st = wc.OpenRead("http://q...content-available-to-author-only...h.net/sec2chd//subject.txt");
  31.  
  32. Encoding enc = Encoding.GetEncoding("Shift_JIS");
  33. StreamReader sr = new StreamReader(st, enc);
  34. html = sr.ReadToEnd();
  35. sr.Close();
  36.  
  37. st.Close();
  38.  
  39. thread = html.Split(new char[] { '\n' });
  40.  
  41. b = 0;
  42. while (!String.IsNullOrEmpty(thread[b]))
  43. {
  44. newdat[b] = thread[b].Substring(0, thread[b].IndexOf("<>"));
  45. b++;
  46. }
  47.  
  48. c = 0;
  49. d = 0;
  50. e = 0;
  51. f = false;
  52.  
  53. while (!String.IsNullOrEmpty(henkou[e]))
  54. {
  55. henkou[e] = " ";
  56. e++;
  57. }
  58.  
  59. while (!String.IsNullOrEmpty(newdat[c]))
  60. {
  61. while (!String.IsNullOrEmpty(dat[d]))
  62. {
  63. if (newdat[c] == dat[d])
  64. {
  65. f = true;
  66. }
  67. d++;
  68. }
  69. if (f == false)
  70. {
  71. henkou[c] = newdat[c];
  72. }
  73. c++;
  74. }
  75.  
  76.  
  77.  
  78. if (shokai)
  79. {
  80. using (StreamWriter w = new StreamWriter(@"C:\Users\ハンバーガー\Desktop\糞\メモ\ちんこ\スレ一覧.txt"))
  81. {
  82. a = 0;
  83. while (!String.IsNullOrEmpty(henkou[a]))
  84. {
  85. if (henkou[a] != " ")
  86. {
  87. w.WriteLine(henkou[a]);
  88. Console.WriteLine(thread[a]);
  89. }
  90. a++;
  91. }
  92. }
  93. }
  94. Array.Copy(newdat, dat, dat.Length);
  95. Console.WriteLine("スレ一覧取得");
  96. Console.WriteLine("----------------");
  97. test = 0;
  98. while (!String.IsNullOrEmpty(dat[test]))
  99. {
  100. Console.WriteLine(dat[test]);
  101. test++;
  102. }
  103. System.Threading.Thread.Sleep(45000);
  104. shokai = true;
  105. }
  106. }
  107. }
  108. }
  109.  
Runtime error #stdin #stdout 0.09s 43096KB
stdin
Standard input is empty
stdout
Standard output is empty