I am writing a program in c#.
I need to know if there an option to open an URL of a site and look for keywords in the text.
For example if my program gets the URL http://www.google.com and the keyword “gmail”
it will return true.
So for conclusion i need to know if there a way to go to URL download the HTML file convert it to text so i could look for my keyword.
I am writing a program in c#. I need to know if there an
Share
You should be able to open the HTML file as-is. HTML files are plaintext, meaning that
FileStreamandStreamReadershould be sufficient to read the file.If you really want the file to be a .txt, you can simply save the file as
filename.txtinstead offilename.htmlwhen you download it.