Over a million developers have joined DZone.

Inspect A Website Like A String In Ruby

·
Put the following function into your ~/.bash_login (or alternatives).


unset -f inspect_url

function inspect_url() { 
   /usr/bin/curl -L -s --max-time 10 "${@}" | ruby -n -e 'p $_.to_s'
   return 0
}

inspect_url http://www.ruby-forum.com
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}