How to handle 404 errors with Ruby HTTP::Net?
- by Kevin
Hi,
I'm trying to parse web pages but I sometimes get 404 errors. Here's the code I use to get the web page:
result = Net::HTTP::get URI.parse(URI.escape(url))
How do I test if result is a 404 error code?
Thank you,
Kevin