fushin 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/fushin.rb +1 -0
- data/lib/fushin/erros.rb +1 -0
- data/lib/fushin/hybrid_analysis.rb +6 -1
- data/lib/fushin/item.rb +2 -0
- data/lib/fushin/posts/sblo.rb +25 -0
- data/lib/fushin/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4130401cafc166adc3cd2991d961790b4b04dc29a94cc27be3f4b16ec046bceb
|
4
|
+
data.tar.gz: c6dd5d23bb2f5b6972f071510a4273cd4a6e24e49c28a72c773c2fac14ab29da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1158d20339e6e1de16d6fecd68c9de1875c478db07655c91664090dccdba12726c24f6fe5796509dd02a0b401aeb7901f7f51ab337f5c80359266637da8d6491
|
7
|
+
data.tar.gz: 61250ae22682319f9630b5b3e8f62f37a7856f2d522150e1d2b44a899e0e55fd970bd563dfc00410eb54990f4584dc8f38a8484654fb9fd0501789d4ed831b39
|
data/README.md
CHANGED
data/lib/fushin.rb
CHANGED
data/lib/fushin/erros.rb
CHANGED
@@ -14,7 +14,12 @@ module Fushin
|
|
14
14
|
url: url
|
15
15
|
}
|
16
16
|
res = HTTP.headers(default_headers).post(url_for("/quick-scan/url-to-file"), form: payload)
|
17
|
-
res.code == 200
|
17
|
+
if res.code == 200
|
18
|
+
JSON.parse(res.body.to_s)
|
19
|
+
else
|
20
|
+
message = JSON.parse(res.body.to_s).dig("message")
|
21
|
+
raise HAResponseError, message
|
22
|
+
end
|
18
23
|
end
|
19
24
|
|
20
25
|
def self.quick_url_scan(url)
|
data/lib/fushin/item.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Fushin
|
4
|
+
module Posts
|
5
|
+
class Sblo < Post
|
6
|
+
def main_selector
|
7
|
+
"div.WordSection1"
|
8
|
+
end
|
9
|
+
|
10
|
+
def main_cleanup_selectors
|
11
|
+
%w(.posted)
|
12
|
+
end
|
13
|
+
|
14
|
+
def attachements
|
15
|
+
@attachements ||= doc.css("div.text > a").map do |a|
|
16
|
+
url = a.get("href")
|
17
|
+
next unless url
|
18
|
+
next unless url.include? "/sblo_files/"
|
19
|
+
|
20
|
+
Models::Attachment.new url
|
21
|
+
end.compact
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/fushin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fushin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -254,6 +254,7 @@ files:
|
|
254
254
|
- lib/fushin/posts/jugem.rb
|
255
255
|
- lib/fushin/posts/kikey.rb
|
256
256
|
- lib/fushin/posts/post.rb
|
257
|
+
- lib/fushin/posts/sblo.rb
|
257
258
|
- lib/fushin/posts/seesaa.rb
|
258
259
|
- lib/fushin/posts/shinobi.rb
|
259
260
|
- lib/fushin/posts/teacup.rb
|