Advertisement
oaktree

gets technobabble

Dec 31st, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.28 KB | None | 0 0
  1. require 'nokogiri'
  2. require 'open-uri'
  3. require 'pry'
  4.  
  5. def get_babble()
  6.     page = Nokogiri::HTML(open("http://phaser.gfxile.net/ligen/technobabble.php?dataset=#{["24","scifi"].sample}"))
  7.  
  8.     10.times do |n|
  9.         puts page.css("#S#{n}").first.text
  10.     end
  11. end
  12.  
  13. 4.times{ get_babble }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement