Advertisement
Guest User

Untitled

a guest
Sep 7th, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.27 KB | None | 0 0
  1.  
  2.  
  3. This works perfectly
  4. but ...
  5.  
  6. curl = %x(curl http://odin.1.ai)
  7. simian = curl.match(/<title>(.*)<\/title>/)[1]
  8. puts simian
  9.  
  10. if a page has no title
  11. curl = %x(curl http://zales.1.ai)
  12. it dies..any way to make it work e.g. with "no title" if a page has no title ?
  13. Thanks
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement