This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run following commands in project directory: | |
npm i eslint-config-last eslint-plugin-react --save-dev | |
npm i eslint babel-eslint prettier eslint-plugin-prettier eslint-config-prettier --save-dev | |
And then create .eslintrc.js with following: | |
module.exports = { | |
extends: ['last', 'prettier/react', 'plugin:react/recommended'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
#Flipkart search URL to scrape | |
url = "http://www.flipkart.com/search-mobiles?query=galaxy&from=all" | |
doc = Nokogiri::HTML(open(url)) | |
puts doc.at_css("title").text | |
doc.css(".fk-inf-scroll-item").each do |item| |