tspider 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95c0d16da560e6dcfa202a5200f921b2c7a11ed7
4
- data.tar.gz: b51c3f6908b93bd5bef97eab7e656269076cc939
3
+ metadata.gz: 937326af40049679a7372ee0b0ee78b01f01083c
4
+ data.tar.gz: e5dc5058e8e1e9f5f740470aa14fef0260480de8
5
5
  SHA512:
6
- metadata.gz: d30570b33595b6a2d02674cc73f6d5ada6f1fa9a7a055b9235afaece12d086f17216f88886df36af299e0d6a11b951b305b31234b0de3acfd7d05d49d5611e2c
7
- data.tar.gz: 521b79d2cbe67b7f4104c074a655019480fdb8e45fa554c755ba362cad7349cd92d2681fdf5111bf0e4ebe784ac318d421afc9ba5311da2441bd2ffa57dce15c
6
+ metadata.gz: d9016aed3de2ac470617cb0f19760e0f23949c3b437768f2c006e7d75ae6f4ea4bffb805d3067734b7943bde2e1d73a301afeefb6946d349a108fcd9c7af3813
7
+ data.tar.gz: b9c8d326fb1ea24065393d7b34b8b121e1beeb4c3bc76b993c1a6697cc915e68d88f264e132d0b20707cf842918736c076baf1bfd8b6aefb2469924ee8cb4430
@@ -5,7 +5,7 @@ require 'webrobots'
5
5
 
6
6
  module Tspider
7
7
  class Page
8
- attr_reader :opf, :html, :doc, :url, :status, :location, :response_time, :response
8
+ attr_reader :html, :doc, :url, :status, :location, :response_time, :response
9
9
 
10
10
  def initialize(attrs)
11
11
  @url = attrs[:url]
@@ -25,23 +25,24 @@ module Tspider
25
25
  @doc = Nokogiri::HTML(@html)
26
26
  @location = r.headers['location']
27
27
  @headers = r.headers.to_hash
28
+ end
28
29
 
29
- @opf = {:url => @url,
30
- :status => @status,
31
- :location => @Location,
32
- :response_time => @response_time,
33
- :canonical => canonical,
34
- :title => title,
35
- :meta_keywords => meta_keywords,
36
- :meta_description => meta_description,
37
- :meta_robots => meta_robots,
38
- :h1 => h1,
39
- :h2 => h2,
40
- :h3 => h3,
41
- :links => links,
42
- :headers => @headers
30
+ def opf
31
+ {:url => @url,
32
+ :status => @status,
33
+ :location => @Location,
34
+ :response_time => @response_time,
35
+ :canonical => canonical,
36
+ :title => title,
37
+ :meta_keywords => meta_keywords,
38
+ :meta_description => meta_description,
39
+ :meta_robots => meta_robots,
40
+ :h1 => h1,
41
+ :h2 => h2,
42
+ :h3 => h3,
43
+ :links => links,
44
+ :headers => @headers
43
45
  }
44
-
45
46
  end
46
47
 
47
48
  def title
@@ -1,3 +1,3 @@
1
1
  module Tspider
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tspider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mqzhang