Setup:
$ mongo
> use pubsub
> db.createCollection('messages', { capped: true, size: 100000 })
> db.messages.insert({})
license: mit |
require 'open-uri' | |
require 'nokogiri' | |
home_page = Nokogiri::HTML(open('http://en.kiosko.net/')) | |
countries = {} | |
cities = {} | |
newspapers = [] |