Converting website to text

I have a translation firm. Clients need their English website to other languages. I need to convert the website to text to get a word count…can you help??

@Ebenezzer

It is possible to get a Word document from a URL using Aspose.Words. Once it is done, words count can also be calculated in the output file. We have move this inquiry in the respective category where you will be assisted shortly and accordingly.

I have a web site that has up to 75 html pages. The ideal is auto but I suppose tis is a page by page mode. I tried taking one page and copied the name but I thinking this doesn’t reveal the url for that page

image002.jpg (10.7 KB)

I tried one html page by coping the nme and it didnt recognize it. I suppose it wasnt the rel URL maybe

@Ebenezzer You can use the following method to load document from url:

Document doc = OpenDocumentFromUrl("https://docs.aspose.com/words/net/product-overview/");
doc.UpdateWordCount();
Console.WriteLine(doc.BuiltInDocumentProperties.Words);
/// <summary>
/// Opens document from web.
/// </summary>
private static Document OpenDocumentFromUrl(string url)
{
    //Prepare the web page we will be asking for
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
    request.Method = "GET";
    request.ContentType = "text/html";
    request.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
    //Execute the request
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    //We will read data via the response stream
    Stream resStream = response.GetResponseStream();
    //Write content into the MemoryStream
    BinaryReader resReader = new BinaryReader(resStream);
    MemoryStream docStream = new MemoryStream(resReader.ReadBytes((int)response.ContentLength));
    // Open document from stream.
    Document doc = new Document(docStream);
    return doc;
}