Skip to content

Instantly share code, notes, and snippets.

@crhan
crhan / gist:2558511
Created April 30, 2012 13:50
用 ruby 算一下去 '第二届中国推荐系统大会-TopGeek和GTUG联合主办' 的公司组成
# -*- coding: utf-8 -*-
require 'nokogiri'
require 'open-uri'
require 'pry'
doc = Nokogiri::HTML(open('http://resys.51qiangzuo.com/'))
a = doc.xpath('//table[@class="attendee_list"]/tr/td').grep(/公司/).map{|a| a.text.gsub(/公司:\s*/,"")}
num = {}
list = {
"土豆" => "土豆网",