kabutops 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kabutops/crawler.rb +2 -1
- data/lib/kabutops/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9d30b351bb730c7b4b6d44de1dfb4b34630c702
|
4
|
+
data.tar.gz: b39802e0b31ad087cd96259957d16624307fe011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ff995f573eeafac0895a0f8095161bda425f970a6095c637e0cf71028e122348a9b7ea2c65cd62e20d013efacb5178a0aa7c26fa6ed9b8e753b5dd61d9a744e
|
7
|
+
data.tar.gz: f9470dee147282accc9dd9a31debd11706f634e14679f085242febdc874aded7ae9e09439ae3e2a77f55892f6a53e6b887f9832bbeebf5a51bdff694d5fd57f8
|
data/lib/kabutops/crawler.rb
CHANGED
@@ -16,7 +16,7 @@ module Kabutops
|
|
16
16
|
include Extensions::CallbackSupport
|
17
17
|
|
18
18
|
params :collection, :proxy, :cache, :wait,
|
19
|
-
:skip_existing, :agent
|
19
|
+
:skip_existing, :agent, :encoding
|
20
20
|
callbacks :after_crawl, :before_cache, :store_if
|
21
21
|
|
22
22
|
def adapters
|
@@ -111,6 +111,7 @@ module Kabutops
|
|
111
111
|
content = Cachy.cache_if(params.cache, cache_key) do
|
112
112
|
sleep params[:wait] || 0 # wait only if value is not from cache
|
113
113
|
body = agent.get(resource[:url]).body
|
114
|
+
body.encode!('utf-8', params[:encoding]) if params[:encoding]
|
114
115
|
page = Nokogiri::HTML(body)
|
115
116
|
self.class.notify(:before_cache, resource, page)
|
116
117
|
body
|
data/lib/kabutops/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kabutops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rene Klacan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|