gscraper 0.2.2 → 0.2.3

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.
@@ -1,3 +1,8 @@
1
+ === 0.2.3 / 2009-01-27
2
+
3
+ * Fixed a bug in GScraper::Search::WebQuery#page, when the search query
4
+ returned less results than the expected results-per-page.
5
+
1
6
  === 0.2.2 / 2009-01-14
2
7
 
3
8
  * Updated GScraper::Search::WebQuery to use Nokogiri properly.
@@ -341,10 +341,11 @@ module GScraper
341
341
  Page.new do |new_page|
342
342
  doc = @agent.get(page_url(page_index))
343
343
  results = doc.search('li.g','li/div.g')
344
+ results_length = [@results_per_page, results.length].min
344
345
 
345
346
  rank_offset = result_offset_of(page_index)
346
347
 
347
- (0...@results_per_page).each do |index|
348
+ (0...results_length).each do |index|
348
349
  result = results[index]
349
350
 
350
351
  rank = rank_offset + (index + 1)
@@ -21,5 +21,5 @@
21
21
  #
22
22
 
23
23
  module GScraper
24
- VERSION = '0.2.2'
24
+ VERSION = '0.2.3'
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gscraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-14 00:00:00 -08:00
12
+ date: 2009-01-27 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.8.2
33
+ version: 1.8.3
34
34
  version:
35
35
  description: GScraper is a web-scraping interface to various Google Services.
36
36
  email: