rendered paste bodyusing System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
//string url = "http://www.wowhead.com/?item=";
string url = "http://eu.wowarmory.com/item-info.xml?i=";
//string url = "http://localhost/";
WebClient client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13");
client.Headers.Add("Accept" , "text/html");
string s = String.Empty;
StreamWriter sw = new StreamWriter("itemlist.txt", true);
for (int i = 0; i < 40000; i++)
{
Stream data = client.OpenRead(url+i);
StreamReader reader = new StreamReader(data);
s = reader.ReadToEnd();
//if (s.Length > 13311)
if (s.Length > 14000)
{
sw.WriteLine(i);
sw.Flush();
}
Console.WriteLine(i+" - "+s.Length);
data.Close();
reader.Close();
}
sw.Flush();
sw.Close();
}
}
}