ruboty-bokete 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f98edcf8358f16cdd3aaf186045b564ffdd87c6
4
- data.tar.gz: 358ee77031f53d2c18bd97e950b0521e81561384
3
+ metadata.gz: c1eebf20d27d177d309e6cc2d6288a10046179ca
4
+ data.tar.gz: 29a6ef0c2ec918843779a074008b3e1889573d08
5
5
  SHA512:
6
- metadata.gz: c589ffc54172226212e9c16fd62ce4f4277a727cabbcdb673099c4713adf6831c6c9203ea2421af03da33496b9c69e34380ea8b2b477a260119141d29cfea279
7
- data.tar.gz: 3229a9e4169193e35ecf65c067bcc9c2cde0bd6d59c5bc9787da0bd336efbc3875d74a15789ecd7c9ba680a74c7faf05ea8a7128cc0ad3aa0e716fb5347bbb6d
6
+ metadata.gz: 0b851b4610f2c6d2d771f72c5dfd9c78b1ac3ebc59ddf2bb52685696b69d6544d27026c54fbd39ec9283ffe60a0fb190062b088fd09e00275a546bb4c3966e88
7
+ data.tar.gz: 97d0440f421e7a07bebea2043593263a4072dffd9b0d7173df7e3573355e501a7ae9220d17a42ed909a170dc3c0e5a42cacc7e76b431171099ff0c31b6fd9ea5
@@ -18,6 +18,7 @@ module Ruboty
18
18
 
19
19
  while results.size < @max_results
20
20
  images = scraping_from_page(target_page)
21
+ p images
21
22
  results.concat(images)
22
23
 
23
24
  target_page = get_next_page(target_page)
@@ -29,7 +30,7 @@ module Ruboty
29
30
  end
30
31
 
31
32
  def scraping_from_page(page)
32
- page.search('.boke').map do |node|
33
+ page.search('.boke').map {|node|
33
34
  node.children.each_with_object({}) do |child, hash|
34
35
  case child.name
35
36
  when 'div'
@@ -39,7 +40,7 @@ module Ruboty
39
40
  hash[:boke] = child.text
40
41
  end
41
42
  end
42
- end
43
+ }.reject(&:empty?)
43
44
  end
44
45
 
45
46
  def get_next_page(page)
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Bokete
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-bokete
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaihar4