Reputation: 33739
I have used WatIn before to scrape a lot of data off of websites. I know I could handle this task with that, but I am hoping for a much lighter solution if possible.
I want to be able to go to a URL, and see if the website has the word "open" on it, or if it has the word "closed" on it.
Does anyone have a good suggestion?
Upvotes: 2
Views: 4760
Reputation: 70354
Yes. Use the WebClient.DownloadString
method and check the page with the standard string
methods. This is as simple as it gets.
If you want more, follow @mekici's tip: The Html Agility Pack.
Upvotes: 5
Reputation: 7480
You can use html parsing.. Html Agility Pack helps you for this.
Upvotes: 6
Reputation: 5614
Explore HttpWebRequest
& HttpWebResponse
. You can get the text of page in a string variable and use IndexOf
or Contains
to get the text
Upvotes: 0