EEEKS! :volcano: 
This is bad. A function called ``is_valid_url?`` (especially the hint of "?" at the end of the name) is expected to tell you "Yes" or "No", so boolean return value.

This function is used like its name would be ... that's hard to tell. 
I see different options: 

* Creating another "is_url_existing" that gives "yes"/"no", depending on 404 or not.
* Renaming the function to "get_url_http_status" or something that better represents wtf this function *actually* does.