PageRankr 3.2.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## Version 4.0.0
4
+ * Fix for Google pagerank check. Query parts were omitted which made the some pages get the same PR as the domain.
5
+ * Switch from Typheous to HTTParty to avoid memory leaks and have better support on Windows.
6
+
3
7
  ## Version 3.2.1
4
8
  * Fix issue where tracker calls proxy with class name rather than name defined on class instance.
5
9
 
@@ -16,11 +16,12 @@ Gem::Specification.new do |s|
16
16
  s.add_development_dependency "bundler", ">= 1.0.0"
17
17
  s.add_development_dependency "fuubar", ">= 0.0.1"
18
18
  s.add_development_dependency "vcr"
19
+ s.add_development_dependency "fakeweb"
19
20
 
20
21
  s.add_runtime_dependency "nokogiri", ">= 1.4.1"
21
22
  s.add_runtime_dependency "json", ">= 1.4.6"
22
23
  s.add_runtime_dependency "public_suffix", ">= 0.9.0"
23
- s.add_runtime_dependency "typhoeus", ">= 0.2.1"
24
+ s.add_runtime_dependency "httparty", ">= 0.9.0"
24
25
  s.add_runtime_dependency "jsonpath", ">= 0.4.2"
25
26
 
26
27
  s.files = `git ls-files`.split("\n")
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Provides an easy way to retrieve Google Page Rank, Alexa Rank, backlink counts, and index counts.
4
4
 
5
+ __Note: Version ~> 2.0 and ~> 3.0 used typheous internally which caused memory leak issues and failures on windows. 4.0.0 changes the implementation to use a Net::HTTP based library for better compatability.__
6
+
5
7
  Check out a little [web app][1] I wrote up that uses it or look at the [source][2].
6
8
 
7
9
  [1]: http://isitpopular.heroku.com
@@ -13,6 +15,12 @@ Check out a little [web app][1] I wrote up that uses it or look at the [source][
13
15
  gem install PageRankr
14
16
  ```
15
17
 
18
+ ## Gemfile
19
+
20
+ ``` ruby
21
+ gem 'PageRankr'
22
+ ```
23
+
16
24
  ## Use it!
17
25
 
18
26
  ``` ruby
@@ -215,19 +223,20 @@ Then, just make sure you require the class and PageRankr and whenever you call P
215
223
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
216
224
  * Send me a pull request. Bonus points for topic branches.
217
225
 
218
- ## TODO Version 4
226
+ ## TODO Version 5
219
227
  * Detect request throttling
220
228
 
221
229
  ## Contributors
222
- * [Dru Ibarra](https://github.com/Druwerd) - Use Google Search API instead of scraping.
223
- * [Iteration Labs, LLC](https://github.com/iterationlabs) - Compete rank tracker and domain indexes.
224
- * [Marc Seeger](http://www.marc-seeger.de) ([Acquia](http://www.acquia.com)) - Ignore invalid ranks that Alexa returns for incorrect sites.
225
- * [Rémy Coutable](https://github.com/rymai) - Update public_suffix_service gem.
226
- * [Jonathan Rudenberg](https://github.com/titanous) - Fix compete scraper.
227
- * [Chris Corbyn](https://github.com/d11wtq) - Fix google page rank url.
228
- * [Hans Haselberg](https://github.com/i0rek) - Update typhoeus gem.
229
- * [Priit Haamer](https://github.com/priithaamer) - Fix google backlinks lookup.
230
- * [Marty McKenna](https://github.com/martyMM) - Idea for proxy service
230
+ * [Dru Ibarra](https://github.com/Druwerd)
231
+ * [Iteration Labs, LLC](https://github.com/iterationlabs)
232
+ * [Marc Seeger](http://www.marc-seeger.de) ([Acquia](http://www.acquia.com))
233
+ * [Rémy Coutable](https://github.com/rymai)
234
+ * [Jonathan Rudenberg](https://github.com/titanous)
235
+ * [Chris Corbyn](https://github.com/d11wtq)
236
+ * [Hans Haselberg](https://github.com/i0rek)
237
+ * [Priit Haamer](https://github.com/priithaamer)
238
+ * [Marty McKenna](https://github.com/martyMM)
239
+ * [Alexi Rahman](https://github.com/odynvolk)
231
240
 
232
241
  ## Shout Out
233
242
  Gotta give credit where credits due!
data/Rakefile CHANGED
@@ -4,4 +4,9 @@ Bundler::GemHelper.install_tasks
4
4
  require 'rspec/core/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
 
7
- task :default => :spec
7
+ task :default => :spec
8
+
9
+ desc "Open an irb session preloaded with this library"
10
+ task :console do
11
+ sh "irb -rubygems -I lib -r page_rankr.rb"
12
+ end
@@ -0,0 +1 @@
1
+ require File.expand_path('../page_rankr', __FILE__)
@@ -1,3 +1,5 @@
1
+ require 'uri'
2
+
1
3
  module PageRankr
2
4
  module ProxyServices
3
5
  class Random
@@ -14,7 +14,7 @@ module PageRankr
14
14
  end
15
15
 
16
16
  def supported_components
17
- [:subdomain, :path]
17
+ [:subdomain, :path, :query]
18
18
  end
19
19
 
20
20
  def url
@@ -0,0 +1,44 @@
1
+ require 'httparty'
2
+
3
+ module PageRankr
4
+ class Request
5
+ def initialize(tracker, options)
6
+ @tracker = tracker
7
+ @options = options
8
+ end
9
+
10
+ def perform
11
+ method = tracker.method
12
+ url = tracker.url
13
+
14
+ response = HTTParty.send(method, url, construct_options(tracker))
15
+ yield response.body if block_given?
16
+ end
17
+
18
+ private
19
+ attr_reader :tracker
20
+
21
+ def construct_options(tracker)
22
+ proxy = tracker.proxy
23
+ params = tracker.params if tracker.respond_to?(:params)
24
+
25
+ options = default_options
26
+ options.merge!({
27
+ :http_proxyaddr => proxy.host,
28
+ :http_proxyport => proxy.port,
29
+ :http_proxyuser => proxy.user,
30
+ :http_proxypass => proxy.password
31
+ }) if proxy
32
+ options.merge!({:query => params}) if params
33
+ options.merge!(@options)
34
+ end
35
+
36
+ def default_options
37
+ {
38
+ :headers => {
39
+ 'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.56.5 (KHTML, like Gecko) Version/5.1.6 Safari/534.56.5'
40
+ }
41
+ }
42
+ end
43
+ end
44
+ end
@@ -1,8 +1,9 @@
1
- require 'typhoeus'
2
1
  require 'nokogiri'
3
2
  require 'json'
4
3
  require 'jsonpath'
4
+ require 'uri'
5
5
  require File.expand_path('../site', __FILE__)
6
+ require File.expand_path('../request', __FILE__)
6
7
 
7
8
  module PageRankr
8
9
  module Tracker
@@ -12,21 +13,10 @@ module PageRankr
12
13
 
13
14
  def initialize(site, options = {})
14
15
  @site = PageRankr::Site(site)
16
+ @options = options
15
17
 
16
- @options = {:method => method, :headers => {'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.12 Safari/535.11'}}
17
- @options[:params] = params if respond_to? :params
18
- @options[:proxy] = proxy
19
- @options.merge!(options)
20
-
21
- request.on_complete do |response|
22
- self.body = response.body
23
- self.raw = content(body)
24
- self.tracked = clean(raw)
25
- end
26
- end
27
-
28
- def request
29
- @request ||= Typhoeus::Request.new(url, @options)
18
+ # Initialize proxy, so threads don't need to synchronize the proxy service.
19
+ proxy
30
20
  end
31
21
 
32
22
  def url
@@ -46,13 +36,15 @@ module PageRankr
46
36
  end
47
37
 
48
38
  def proxy
49
- PageRankr.proxy_service.proxy(name, @site) if PageRankr.proxy_service
39
+ @proxy ||= URI.parse(PageRankr.proxy_service.proxy(name, @site)) if PageRankr.proxy_service
50
40
  end
51
41
 
52
42
  def run
53
- hydra = Typhoeus::Hydra.new
54
- hydra.queue request
55
- hydra.run
43
+ PageRankr::Request.new(self, @options).perform do |body|
44
+ self.body = body
45
+ self.raw = content(body)
46
+ self.tracked = clean(raw)
47
+ end
56
48
 
57
49
  tracked
58
50
  end
@@ -1,4 +1,4 @@
1
- require 'typhoeus'
1
+ require 'thread'
2
2
 
3
3
  module PageRankr
4
4
  module Trackers
@@ -10,27 +10,32 @@ module PageRankr
10
10
 
11
11
  def lookup(site, *trackers)
12
12
  trackers = site_trackers if trackers.empty?
13
-
14
- tracked = {}
15
- hydra = Typhoeus::Hydra.new
16
- trackers.each do |tracker|
13
+
14
+ tracked = trackers.map do |tracker|
17
15
  name, klass = constant_name(tracker), self.class
18
16
 
19
17
  next unless klass.const_defined? name
20
18
 
21
- tracked[tracker] = klass.const_get(name).new(site)
22
- hydra.queue tracked[tracker].request
23
- end
24
- hydra.run
25
-
26
- tracked.keys.each do |tracker|
27
- tracked[tracker] = tracked[tracker].tracked
19
+ [
20
+ tracker,
21
+ build_thread(tracker, klass.const_get(name), site)
22
+ ]
23
+ end.each do |_, thread|
24
+ thread.join
25
+ end.map do |tracker, thread|
26
+ [tracker, thread.value]
28
27
  end
29
28
 
30
- tracked
29
+ Hash[tracked]
31
30
  end
32
31
 
33
32
  private
33
+
34
+ def build_thread(tracker, instance, site)
35
+ Thread.new(tracker, instance, site) do |t, i, s|
36
+ i.new(s).run
37
+ end
38
+ end
34
39
 
35
40
  def symbol_for(klass)
36
41
  word = klass.to_s.dup
@@ -1,3 +1,3 @@
1
1
  module PageRankr
2
- VERSION = "3.2.1"
2
+ VERSION = "4.0.0"
3
3
  end
@@ -1,181 +1,197 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: get
5
5
  uri: http://data.alexa.com/data?cli=10&dat=snbamz&url=slocourts.net
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML,
12
- like Gecko) Chrome/17.0.963.12 Safari/535.11
13
- response:
14
- status:
6
+ body:
7
+ string: ""
8
+ headers:
9
+ user-agent:
10
+ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.56.5 (KHTML, like Gecko) Version/5.1.6 Safari/534.56.5
11
+ response:
12
+ status:
15
13
  code: 200
16
- message: !binary |-
17
- T0s=
18
- headers:
19
- !binary "Q29udGVudC1UeXBl":
20
- - !binary |-
21
- dGV4dC94bWw=
22
- !binary "Q29udGVudC1MZW5ndGg=":
23
- - !binary |-
24
- MjU2Nw==
25
- !binary "Q29ubmVjdGlvbg==":
26
- - !binary |-
27
- a2VlcC1hbGl2ZQ==
28
- body:
29
- encoding: ASCII-8BIT
30
- string: !binary |-
31
- PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCg0KPEFM
32
- RVhBIFZFUj0iMC45IiBVUkw9InNsb2NvdXJ0cy5j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SJDYWxpZm9ybmlhL0dvdmVybm1lbnQiIENJ
82
- RD0iNjIwNjA4Ii8+CjxDQVQgSUQ9IlRvcC9Xb3JsZC9Fc3Bhw7FvbC9SZWdp
83
- b25hbC9BbcOpcmljYS9Fc3RhZG9zX1VuaWRvcy9Fc3RhZG9zL0NhbGlmb3Ju
84
- aWEiIFRJVExFPSJFc3RhZG9zL0NhbGlmb3JuaWEiIENJRD0iMjYyNDkiLz4K
85
- PC9DQVRTPgo8L1NJVEU+CjwvRE1PWj4KPFNEPgo8UE9QVUxBUklUWSBVUkw9
86
- ImNhLmdvdi8iIFRFWFQ9Ijc2MCIgU09VUkNFPSJwYW5lbCIvPgo8UkVBQ0gg
87
- UkFOSz0iODQ0Ii8+CjxSQU5LIERFTFRBPSItODgiLz4KPC9TRD4KPC9BTEVY
88
- QT4=
89
- http_version: !binary |-
90
- MS4x
91
- recorded_at: Sat, 12 May 2012 18:39:16 GMT
92
- - request:
14
+ message: OK
15
+ headers:
16
+ connection:
17
+ - Close
18
+ content-type:
19
+ - text/xml
20
+ content-length:
21
+ - "2620"
22
+ body:
23
+ string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\
24
+ \r\n\
25
+ <ALEXA VER=\"0.9\" URL=\"slocourts.ca.gov/\" HOME=\"0\" AID=\"=\">\r\n\
26
+ <RLS PREFIX=\"http://\" more=\"23\">\n\
27
+ <RL HREF=\"www.co.riverside.ca.us/depts/courts\" TITLE=\"Superior Court Of California County Of Riverside\"/>\n\
28
+ <RL HREF=\"courts.countyofventura.org/\" TITLE=\"Superior Court, Ventura\"/>\n\
29
+ <RL HREF=\"www.co.san-bernardino.ca.us/Courts\" TITLE=\"Superior Court, San Bernardino\"/>\n\
30
+ <RL HREF=\"www.ci.sf.ca.us/courts\" TITLE=\"Superior Court, San Francisco\"/>\n\
31
+ <RL HREF=\"www.sbcourts.org/\" TITLE=\"Superior Court, Santa Barbara\"/>\n\
32
+ <RL HREF=\"www.slosheriff.org/\" TITLE=\"San Luis Obispo County Sheriff&apos;s Department\"/>\n\
33
+ <RL HREF=\"www.slodss.org/\" TITLE=\"San Luis Obispo County Department of Social Services\"/>\n\
34
+ <RL HREF=\"www.slocountypwd.org/\" TITLE=\"San Luis Obispo County Department of Public Works and Transportation\"/>\n\
35
+ <RL HREF=\"www.slocountyfranchiseadministration.org/\" TITLE=\"San Luis Obispo County Franchise Administration\"/>\n\
36
+ <RL HREF=\"www.slocog.org/\" TITLE=\"SLOCOG\"/>\n\
37
+ <RL HREF=\"www.buttonware.com/\" TITLE=\"www.buttonware.com/\"/>\n\
38
+ </RLS>\n\
39
+ <SD TITLE=\"A\" FLAGS=\"DMOZ\" HOST=\"slocourts.ca.gov\">\n\
40
+ <TITLE TEXT=\"Superior Court, San Luis Obispo\"/>\n\
41
+ <ADDR STREET=\"3101 Gold Camp Dr\" CITY=\"Rancho Cordova\" STATE=\"CA\" ZIP=\"95670\" COUNTRY=\"US\" />\n\
42
+ <CREATED DATE=\"16-Jun-2000\" DAY=\"16\" MONTH=\"06\" YEAR=\"2000\"/>\n\
43
+ <PHONE NUMBER=\"+1 916 464 4239\"/>\n\
44
+ <OWNER NAME=\"State of California\"/>\n\
45
+ <EMAIL ADDR=\"lbatcheldor@co.slo.ca.us\"/>\n\
46
+ <LANG LEX=\"en\" CODE=\"us-ascii\"/>\n\
47
+ <LINKSIN NUM=\"12\"/>\n\
48
+ <SPEED TEXT=\"716\" PCT=\"83\"/>\n\
49
+ <REVIEWS AVG=\"4.5\" NUM=\"\"/>\n\
50
+ <CHILD SRATING=\"0\"/>\n\
51
+ </SD>\n\n\
52
+ <KEYWORDS>\n\
53
+ <KEYWORD VAL=\"San Luis Obispo\"/>\n\
54
+ </KEYWORDS><DMOZ>\n\
55
+ <SITE BASE=\"slocourts.ca.gov/\" TITLE=\"SLO County Superior Court\" DESC=\"Administrative site of the Superior Court, with information, public notices, and bail and fee schedules.\">\n\
56
+ <CATS>\n\
57
+ <CAT ID=\"Top/Regional/North_America/United_States/California/Government/Courts\" TITLE=\"Government/Courts\" CID=\"620717\"/>\n\
58
+ <CAT ID=\"Top/Regional/North_America/United_States/California/Counties/San_Luis_Obispo/Government\" TITLE=\"San Luis Obispo/Government\" CID=\"620510\"/>\n\
59
+ <CAT ID=\"Top/Regional/North_America/United_States/California\" TITLE=\"United States/California\" CID=\"619087\"/>\n\
60
+ <CAT ID=\"Top/Regional/North_America/United_States/California/Government\" TITLE=\"California/Government\" CID=\"620608\"/>\n\
61
+ <CAT ID=\"Top/World/Espa\xC3\xB1ol/Regional/Am\xC3\xA9rica/Estados_Unidos/Estados/California\" TITLE=\"Estados/California\" CID=\"26249\"/>\n\
62
+ </CATS>\n\
63
+ </SITE>\n\
64
+ </DMOZ>\n\
65
+ <SD>\n\
66
+ <POPULARITY URL=\"ca.gov/\" TEXT=\"775\" SOURCE=\"panel\"/>\n\
67
+ <REACH RANK=\"896\"/>\n\
68
+ <RANK DELTA=\"-10\"/>\n\
69
+ <COUNTRY CODE=\"US\" NAME=\"United States\" RANK=\"197\"/>\n\
70
+ </SD>\n\
71
+ </ALEXA>"
72
+ http_version: "1.1"
73
+ recorded_at: Mon, 17 Dec 2012 17:03:43 GMT
74
+ - request:
93
75
  method: get
94
76
  uri: http://data.alexa.com/data?cli=10&dat=snbamz&url=slocourts.net
95
- body:
96
- encoding: US-ASCII
97
- string: ''
98
- headers:
99
- User-Agent:
100
- - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML,
101
- like Gecko) Chrome/17.0.963.12 Safari/535.11
102
- response:
103
- status:
77
+ body:
78
+ string: ""
79
+ headers:
80
+ user-agent:
81
+ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.56.5 (KHTML, like Gecko) Version/5.1.6 Safari/534.56.5
82
+ response:
83
+ status:
104
84
  code: 200
105
- message: !binary |-
106
- T0s=
107
- headers:
108
- !binary "Q29udGVudC1UeXBl":
109
- - !binary |-
110
- dGV4dC94bWw=
111
- !binary "Q29udGVudC1MZW5ndGg=":
112
- - !binary |-
113
- MjU2Nw==
114
- !binary "Q29ubmVjdGlvbg==":
115
- - !binary |-
116
- a2VlcC1hbGl2ZQ==
117
- body:
118
- encoding: ASCII-8BIT
119
- string: !binary |-
120
- PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCg0KPEFM
121
- RVhBIFZFUj0iMC45IiBVUkw9InNsb2NvdXJ0cy5jYS5nb3YvIiBIT01FPSIw
122
- IiBBSUQ9Ij0iPg0KPFJMUyBQUkVGSVg9Imh0dHA6Ly8iIG1vcmU9IjIzIj4K
123
- PFJMIEhSRUY9ImNvdXJ0cy5jb3VudHlvZnZlbnR1cmEub3JnLyIgVElUTEU9
124
- IlN1cGVyaW9yIENvdXJ0LCBWZW50dXJhIi8+CjxSTCBIUkVGPSJ3d3cuY28u
125
- c2FuLWJlcm5hcmRpbm8uY2EudXMvQ291cnRzIiBUSVRMRT0iU3VwZXJpb3Ig
126
- Q291cnQsIFNhbiBCZXJuYXJkaW5vIi8+CjxSTCBIUkVGPSJ3d3cuY28ucml2
127
- ZXJzaWRlLmNhLnVzL2RlcHRzL2NvdXJ0cyIgVElUTEU9IlN1cGVyaW9yIENv
128
- dXJ0IE9mIENhbGlmb3JuaWEgQ291bnR5IE9mIFJpdmVyc2lkZSIvPgo8Ukwg
129
- SFJFRj0id3d3LmNpLnNmLmNhLnVzL2NvdXJ0cyIgVElUTEU9IlN1cGVyaW9y
130
- IENvdXJ0LCBTYW4gRnJhbmNpc2NvIi8+CjxSTCBIUkVGPSJ3d3cuc2Jjb3Vy
131
- dHMub3JnLyIgVElUTEU9IlN1cGVyaW9yIENvdXJ0LCBTYW50YSBCYXJiYXJh
132
- Ii8+CjxSTCBIUkVGPSJ3d3cuc2xvc2hlcmlmZi5vcmcvIiBUSVRMRT0iU2Fu
133
- IEx1aXMgT2Jpc3BvIENvdW50eSBTaGVyaWZmJmFwb3M7cyBEZXBhc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pb25hbC9Ob3J0aF9BbWVyaWNh
167
- L1VuaXRlZF9TdGF0ZXMvQ2FsaWZvcm5pYSIgVElUTEU9IlVuaXRlZCBTdGF0
168
- ZXMvQ2FsaWZvcm5pYSIgQ0lEPSI2MTkwODciLz4KPENBVCBJRD0iVG9wL1Jl
169
- Z2lvbmFsL05vcnRoX0FtZXJpY2EvVW5pdGVkX1N0YXRlcy9DYWxpZm9ybmlh
170
- L0dvdmVybm1lbnQiIFRJVExFPSJDYWxpZm9ybmlhL0dvdmVybm1lbnQiIENJ
171
- RD0iNjIwNjA4Ii8+CjxDQVQgSUQ9IlRvcC9Xb3JsZC9Fc3Bhw7FvbC9SZWdp
172
- b25hbC9BbcOpcmljYS9Fc3RhZG9zX1VuaWRvcy9Fc3RhZG9zL0NhbGlmb3Ju
173
- aWEiIFRJVExFPSJFc3RhZG9zL0NhbGlmb3JuaWEiIENJRD0iMjYyNDkiLz4K
174
- PC9DQVRTPgo8L1NJVEU+CjwvRE1PWj4KPFNEPgo8UE9QVUxBUklUWSBVUkw9
175
- ImNhLmdvdi8iIFRFWFQ9Ijc2MCIgU09VUkNFPSJwYW5lbCIvPgo8UkVBQ0gg
176
- UkFOSz0iODQ0Ii8+CjxSQU5LIERFTFRBPSItODgiLz4KPC9TRD4KPC9BTEVY
177
- QT4=
178
- http_version: !binary |-
179
- MS4x
180
- recorded_at: Sat, 12 May 2012 18:39:16 GMT
181
- recorded_with: VCR 2.0.1
85
+ message: OK
86
+ headers:
87
+ connection:
88
+ - Close
89
+ content-type:
90
+ - text/xml
91
+ content-length:
92
+ - "2620"
93
+ body:
94
+ string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\
95
+ \r\n\
96
+ <ALEXA VER=\"0.9\" URL=\"slocourts.ca.gov/\" HOME=\"0\" AID=\"=\">\r\n\
97
+ <RLS PREFIX=\"http://\" more=\"23\">\n\
98
+ <RL HREF=\"www.co.riverside.ca.us/depts/courts\" TITLE=\"Superior Court Of California County Of Riverside\"/>\n\
99
+ <RL HREF=\"courts.countyofventura.org/\" TITLE=\"Superior Court, Ventura\"/>\n\
100
+ <RL HREF=\"www.co.san-bernardino.ca.us/Courts\" TITLE=\"Superior Court, San Bernardino\"/>\n\
101
+ <RL HREF=\"www.ci.sf.ca.us/courts\" TITLE=\"Superior Court, San Francisco\"/>\n\
102
+ <RL HREF=\"www.sbcourts.org/\" TITLE=\"Superior Court, Santa Barbara\"/>\n\
103
+ <RL HREF=\"www.slosheriff.org/\" TITLE=\"San Luis Obispo County Sheriff&apos;s Department\"/>\n\
104
+ <RL HREF=\"www.slodss.org/\" TITLE=\"San Luis Obispo County Department of Social Services\"/>\n\
105
+ <RL HREF=\"www.slocountypwd.org/\" TITLE=\"San Luis Obispo County Department of Public Works and Transportation\"/>\n\
106
+ <RL HREF=\"www.slocountyfranchiseadministration.org/\" TITLE=\"San Luis Obispo County Franchise Administration\"/>\n\
107
+ <RL HREF=\"www.slocog.org/\" TITLE=\"SLOCOG\"/>\n\
108
+ <RL HREF=\"www.buttonware.com/\" TITLE=\"www.buttonware.com/\"/>\n\
109
+ </RLS>\n\
110
+ <SD TITLE=\"A\" FLAGS=\"DMOZ\" HOST=\"slocourts.ca.gov\">\n\
111
+ <TITLE TEXT=\"Superior Court, San Luis Obispo\"/>\n\
112
+ <ADDR STREET=\"3101 Gold Camp Dr\" CITY=\"Rancho Cordova\" STATE=\"CA\" ZIP=\"95670\" COUNTRY=\"US\" />\n\
113
+ <CREATED DATE=\"16-Jun-2000\" DAY=\"16\" MONTH=\"06\" YEAR=\"2000\"/>\n\
114
+ <PHONE NUMBER=\"+1 916 464 4239\"/>\n\
115
+ <OWNER NAME=\"State of California\"/>\n\
116
+ <EMAIL ADDR=\"lbatcheldor@co.slo.ca.us\"/>\n\
117
+ <LANG LEX=\"en\" CODE=\"us-ascii\"/>\n\
118
+ <LINKSIN NUM=\"12\"/>\n\
119
+ <SPEED TEXT=\"716\" PCT=\"83\"/>\n\
120
+ <REVIEWS AVG=\"4.5\" NUM=\"\"/>\n\
121
+ <CHILD SRATING=\"0\"/>\n\
122
+ </SD>\n\n\
123
+ <KEYWORDS>\n\
124
+ <KEYWORD VAL=\"San Luis Obispo\"/>\n\
125
+ </KEYWORDS><DMOZ>\n\
126
+ <SITE BASE=\"slocourts.ca.gov/\" TITLE=\"SLO County Superior Court\" DESC=\"Administrative site of the Superior Court, with information, public notices, and bail and fee schedules.\">\n\
127
+ <CATS>\n\
128
+ <CAT ID=\"Top/Regional/North_America/United_States/California/Government/Courts\" TITLE=\"Government/Courts\" CID=\"620717\"/>\n\
129
+ <CAT ID=\"Top/Regional/North_America/United_States/California/Counties/San_Luis_Obispo/Government\" TITLE=\"San Luis Obispo/Government\" CID=\"620510\"/>\n\
130
+ <CAT ID=\"Top/Regional/North_America/United_States/California\" TITLE=\"United States/California\" CID=\"619087\"/>\n\
131
+ <CAT ID=\"Top/Regional/North_America/United_States/California/Government\" TITLE=\"California/Government\" CID=\"620608\"/>\n\
132
+ <CAT ID=\"Top/World/Espa\xC3\xB1ol/Regional/Am\xC3\xA9rica/Estados_Unidos/Estados/California\" TITLE=\"Estados/California\" CID=\"26249\"/>\n\
133
+ </CATS>\n\
134
+ </SITE>\n\
135
+ </DMOZ>\n\
136
+ <SD>\n\
137
+ <POPULARITY URL=\"ca.gov/\" TEXT=\"775\" SOURCE=\"panel\"/>\n\
138
+ <REACH RANK=\"896\"/>\n\
139
+ <RANK DELTA=\"-10\"/>\n\
140
+ <COUNTRY CODE=\"US\" NAME=\"United States\" RANK=\"197\"/>\n\
141
+ </SD>\n\
142
+ </ALEXA>"
143
+ http_version: "1.1"
144
+ recorded_at: Mon, 17 Dec 2012 17:03:43 GMT
145
+ - request:
146
+ method: get
147
+ uri: http://data.alexa.com/data?dat=snbamz&url=slocourts.net&cli=10
148
+ body:
149
+ string: ""
150
+ headers:
151
+ user-agent:
152
+ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.56.5 (KHTML, like Gecko) Version/5.1.6 Safari/534.56.5
153
+ response:
154
+ status:
155
+ code: 200
156
+ message: OK
157
+ headers:
158
+ connection:
159
+ - Close
160
+ content-type:
161
+ - text/xml
162
+ content-length:
163
+ - "30"
164
+ body:
165
+ string: |
166
+
167
+ <ALEXA VER="0.9" URL="404"/>
168
+
169
+ http_version: "1.1"
170
+ recorded_at: Tue, 18 Dec 2012 01:21:40 GMT
171
+ - request:
172
+ method: get
173
+ uri: http://data.alexa.com/data?dat=snbamz&url=slocourts.net&cli=10
174
+ body:
175
+ string: ""
176
+ headers:
177
+ user-agent:
178
+ - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.56.5 (KHTML, like Gecko) Version/5.1.6 Safari/534.56.5
179
+ response:
180
+ status:
181
+ code: 200
182
+ message: OK
183
+ headers:
184
+ connection:
185
+ - Close
186
+ content-type:
187
+ - text/xml
188
+ content-length:
189
+ - "30"
190
+ body:
191
+ string: |
192
+
193
+ <ALEXA VER="0.9" URL="404"/>
194
+
195
+ http_version: "1.1"
196
+ recorded_at: Tue, 18 Dec 2012 01:21:40 GMT
197
+ recorded_with: VCR 2.3.0