Sha256: ad25ec651acf000acf1f57a578b240ec370c1978979c462f459bb7e438bfd613

Contents?: true

Size: 567 Bytes

Versions: 54

Compression:

Stored size: 567 Bytes

Contents

# Some basic MetaInspector samples

$: << File.join(File.dirname(__FILE__), "/../lib")
require 'meta_inspector'
require 'ap'

puts "Enter a valid http url to scrape it"
url = gets.strip
page = MetaInspector.new(url)
puts "...please wait while scraping the page..."

puts "Scraping #{page.url} returned these results:"
puts "TITLE: #{page.title}"
puts "META DESCRIPTION: #{page.meta_description}"
puts "META KEYWORDS: #{page.meta_keywords}"
puts "#{page.links.size} links found..."
page.links.each do |link|
  puts " ==> #{link}"
end

puts "to_hash..."
ap page.to_hash

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
metainspector-3.2.0 samples/basic_scraping.rb
metainspector-3.1.1 samples/basic_scraping.rb
metainspector-3.1.0 samples/basic_scraping.rb
metainspector-3.0.0 samples/basic_scraping.rb
metainspector-2.3.2 samples/basic_scraping.rb
metainspector-2.3.1 samples/basic_scraping.rb
metainspector-2.3.0 samples/basic_scraping.rb
metainspector-2.2.1 samples/basic_scraping.rb
metainspector-2.2.0 samples/basic_scraping.rb
metainspector-2.1.0 samples/basic_scraping.rb
metainspector-2.0.0 samples/basic_scraping.rb
metainspector-1.17.3 samples/basic_scraping.rb
metainspector-1.17.2 samples/basic_scraping.rb
metainspector-1.17.1 samples/basic_scraping.rb
metainspector-1.17.0 samples/basic_scraping.rb
metainspector-1.16.1 samples/basic_scraping.rb
metainspector-1.16.0 samples/basic_scraping.rb
metainspector-1.15.4 samples/basic_scraping.rb
metainspector-1.15.3 samples/basic_scraping.rb
metainspector-1.15.2 samples/basic_scraping.rb