web_stat 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/web_stat/fetch.rb +4 -3
- data/lib/web_stat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 352eb0f97a6a88cff0b1f48ff69a590a95551d39872274ff1254c7eb6aebb682
|
4
|
+
data.tar.gz: 870373df7f7d876cd838c37cb5555c17793d6be9064606c2397c2905ac821b9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a77f908691b76a6c772a23cb0f234f77fbeb2ffb8e04328249ce2e4d6aeda2b08f418d373a60f2003a41aaa7396a7405084208e1de0d5afb8dee3466d10fa52
|
7
|
+
data.tar.gz: eaf48a08ef04abd59569810919b4f85037a552dd0a379d7fba4efd6362c2d5ba2061963cfce11ba3f0c6d13f82932e6205792cca622758c166a6b546a1a9e8f3
|
data/Gemfile.lock
CHANGED
data/lib/web_stat/fetch.rb
CHANGED
@@ -25,10 +25,10 @@ module WebStat
|
|
25
25
|
end
|
26
26
|
site_name.strip
|
27
27
|
end
|
28
|
-
|
28
|
+
[]
|
29
29
|
# Get main section
|
30
30
|
def content
|
31
|
-
Sanitize.clean(Readability::Document.new(@
|
31
|
+
Sanitize.clean(Readability::Document.new(@nokogiri.at('body')).content)
|
32
32
|
end
|
33
33
|
|
34
34
|
# Get temporary path of image
|
@@ -67,7 +67,8 @@ module WebStat
|
|
67
67
|
agent = Mechanize.new { |_agent| _agent.user_agent = WebStat::Configure.get["user_agent"] }
|
68
68
|
# Enable to read Robots.txt
|
69
69
|
agent.robots = true
|
70
|
-
agent.get(url, [], nil, { 'Accept-Language' => 'ja'})
|
70
|
+
document = agent.get(url, [], nil, { 'Accept-Language' => 'ja'})
|
71
|
+
document.body.encode('UTF-8', document.encoding)
|
71
72
|
end
|
72
73
|
|
73
74
|
# Get the informations of @url
|
data/lib/web_stat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web_stat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yusuke abe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|