Home > Enterprise >  how to make Visual studio read from google searches. C#
how to make Visual studio read from google searches. C#

Time:07-23

I am making an AI that uses google searches to learn, I know there is a way to open a link through Process.Start("https://Google.com") but is there a way to then read data from the page you just opened? preferably without google's API. thx

CodePudding user response:

With

Process.Start("https://Google.com");

you call only the web page with a browser, but here with you get the whole page, but of course only as HTML, but this can be sniffed.

static string GetData(string url)
{
    using (WebClient wc = new WebClient())
    {
        return wc.DownloadString(url);
    }
}

You call the function, and get the whole web page. Is that what you mean?

  •  Tags:  
  • c#
  • Related