Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Script to scrape the clients feed behind the map on MindBody's website
require 'nokogiri'
require 'pp'
require 'mechanize'
require 'open-uri'
require 'csv'
page = Nokogiri::XML(open(''))
items = page.css('marker')"mind_new.csv", "wb") do |csv|
csv << ['Name', 'Industry', 'Country', 'City', 'Lon', 'Lat']
for i in 0..items.length()-1
name = items[i]['name']
industry = items[i]['industry']
country = items[i]['country']
city = items[i]['city']
lat = items[i]['lat']
lon = items[i]['lng']
csv << [name, industry, country, city, lat, lon]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment