Skip to content

Instantly share code, notes, and snippets.

@amardaxini
Created August 20, 2013 17:34
Show Gist options
  • Save amardaxini/6284609 to your computer and use it in GitHub Desktop.
Save amardaxini/6284609 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'pry'
url = "http://www.myntra.com/brands?nav_id=2"
doc = Nokogiri::HTML(open(url))
brand_list = doc.at_css(".brands-list")
brand_name = []
brand_list.children.css("span").find_all{|y|brand_name<< y.text}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment