tomosia_icon8_crawl 0.1.7 → 0.1.8
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.
- checksums.yaml +4 -4
- data/Gemfile +0 -1
- data/Gemfile.lock +0 -4
- data/lib/tomosia_icon8_crawl.rb +6 -1
- data/lib/tomosia_icon8_crawl/version.rb +1 -1
- data/tomosia_icon8_crawl.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bb616bc43457255e62c075140fd4ab1b1a462ee1c07fae884221b0f474d9d57
|
4
|
+
data.tar.gz: 899afe155c3484dc7bac9b6df452094b89676ff5d855f865d57710e797248849
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 928c1591780c975fb2234287136874a7d59f17985b1f3f4a3f623a04411b3af1e1fb2659d0633e4f9be969c044892539182430163281610adfec5c606a97e6d8
|
7
|
+
data.tar.gz: 2e2b5ff37091fd220e6eb701ed7c413d6f948c0e050fe65fefdda1899e92fdd4544cce86e1daf49b3654ff18c5c623c6f7927264ceb183aab21ccbe161597c25
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -4,7 +4,6 @@ PATH
|
|
4
4
|
tomosia_icon8_crawl (0.1.4)
|
5
5
|
httparty
|
6
6
|
nokogiri
|
7
|
-
pry
|
8
7
|
thor
|
9
8
|
writeexcel
|
10
9
|
|
@@ -24,9 +23,6 @@ GEM
|
|
24
23
|
multi_xml (0.6.0)
|
25
24
|
nokogiri (1.10.10-x64-mingw32)
|
26
25
|
mini_portile2 (~> 2.4.0)
|
27
|
-
pry (0.13.1)
|
28
|
-
coderay (~> 1.1)
|
29
|
-
method_source (~> 1.0)
|
30
26
|
rake (12.3.3)
|
31
27
|
rspec (3.9.0)
|
32
28
|
rspec-core (~> 3.9.0)
|
data/lib/tomosia_icon8_crawl.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
module TomosiaIcon8Crawl
|
2
2
|
require 'open-uri'
|
3
3
|
require "httparty"
|
4
|
-
require 'pry'
|
5
4
|
require 'writeexcel'
|
6
5
|
class CrawlIcon8
|
7
6
|
|
@@ -34,6 +33,7 @@ module TomosiaIcon8Crawl
|
|
34
33
|
|
35
34
|
# save file to excel
|
36
35
|
def self.save_file_excel( path, data = {})
|
36
|
+
p "Write excel"
|
37
37
|
begin
|
38
38
|
des = path + '/export.xls'
|
39
39
|
workbook = WriteExcel.new(des)
|
@@ -79,6 +79,7 @@ module TomosiaIcon8Crawl
|
|
79
79
|
p "Can't saved file"
|
80
80
|
p e
|
81
81
|
end
|
82
|
+
p "Write excel susscess!"
|
82
83
|
end
|
83
84
|
|
84
85
|
# download image
|
@@ -102,6 +103,8 @@ module TomosiaIcon8Crawl
|
|
102
103
|
|
103
104
|
# multi download image
|
104
105
|
def self.multi_download_image(path, imgs)
|
106
|
+
p "Start download image"
|
107
|
+
print "Loadding"
|
105
108
|
begin
|
106
109
|
threads = []
|
107
110
|
@data = []
|
@@ -115,6 +118,7 @@ module TomosiaIcon8Crawl
|
|
115
118
|
download_image(des, img)
|
116
119
|
row = {"index" => index, "name" => title, "url" => img, "size" => @size, "extension" => ext}
|
117
120
|
@data.push(row)
|
121
|
+
print "."
|
118
122
|
end
|
119
123
|
end
|
120
124
|
threads.each{ |t| t.join }
|
@@ -122,6 +126,7 @@ module TomosiaIcon8Crawl
|
|
122
126
|
p "no data"
|
123
127
|
p e
|
124
128
|
end
|
129
|
+
print "\nDownload success!\n"
|
125
130
|
end
|
126
131
|
|
127
132
|
# main
|
data/tomosia_icon8_crawl.gemspec
CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.add_runtime_dependency "httparty", '~> 0.17.3'
|
19
19
|
spec.add_runtime_dependency "writeexcel", '~> 1.0', '>= 1.0.5'
|
20
20
|
spec.add_runtime_dependency "nokogiri", '~> 1.10', '>= 1.10.10'
|
21
|
-
spec.add_runtime_dependency "pry", '~> 0.13.1'
|
22
21
|
|
23
22
|
# Specify which files should be added to the gem when it is released.
|
24
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tomosia_icon8_crawl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ninh-tomosia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -126,20 +126,6 @@ dependencies:
|
|
126
126
|
- - ">="
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: 1.10.10
|
129
|
-
- !ruby/object:Gem::Dependency
|
130
|
-
name: pry
|
131
|
-
requirement: !ruby/object:Gem::Requirement
|
132
|
-
requirements:
|
133
|
-
- - "~>"
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version: 0.13.1
|
136
|
-
type: :runtime
|
137
|
-
prerelease: false
|
138
|
-
version_requirements: !ruby/object:Gem::Requirement
|
139
|
-
requirements:
|
140
|
-
- - "~>"
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: 0.13.1
|
143
129
|
description:
|
144
130
|
email:
|
145
131
|
- tt.ninh.le@tomosia.com
|