Skip to content

Instantly share code, notes, and snippets.

@danbri
Created June 23, 2010 18:01
Show Gist options
  • Save danbri/450290 to your computer and use it in GitHub Desktop.
Save danbri/450290 to your computer and use it in GitHub Desktop.
!/usr/bin/ruby -rubygems
require 'json'
require 'net/http'
data=''
Net::HTTP.start('veetle.com', 80) do |http|
x = http.get('/channel-listing-cross-site.js').body
x.gsub!(/VEETLE\.channelList\.preFetch\(\);/,'')
x.gsub!(/VEETLE\.channelList\.list=/,'')
x.gsub!(/; VEETLE\.channelList\.postFetch\(\);/,'')
data = JSON.parse(x)
end
data.each do |c|
puts "Channel: #{c['channelId']} t:#{c['title']} d:#{c['description']} v:#{c['numberOfViews']} pop:#{c['popularityIndex']}"
puts "\n\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment