tomosia_icon8_crawl 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c21279b8197476970de56e3a4b69f19920e7b385b654a4c419ed3cf590957316
4
- data.tar.gz: abb7c3ca0fe358faa2b62e858dcf0e00b03d18de2d8e4b5b1dd0febe4dd71024
3
+ metadata.gz: 1f31b322adad997e3fc62c5fb47c4c9c5053f8b56ce58843918de189b64bbebd
4
+ data.tar.gz: 35c6ee6157c954c09fc5223a33b909268bb6a00c9040734accee4881c6f7f4e9
5
5
  SHA512:
6
- metadata.gz: 7a85aa7ba63cfd10f42dfca35e223f120ad72602808a3e3ca282ce5aa4988848776a8957fd567287209c0c8f66ac106f19351ab8104f7c4e5805affcd738b3b3
7
- data.tar.gz: d565d7ecf7cc89ca1a79535dec886616b96649a3f5f3fbafcf368ff1cb290e8c31cb418fbc180e6e1c27701b623178b74fbd20f965f82e1bcde37a59407851b3
6
+ metadata.gz: e7a13abfab173d318d405756a5d6637865d4eed4b0b8808690e81284d46dee3bc90deecfc691e3ef7e8e880984bf69bd5c0b2439d538581e3f25563f7aa0eae0
7
+ data.tar.gz: 8ce5c215458327b2723e40679c2463146f216149cc90b0157edd4d1cf235681a7daa08fb45421233b5eb1636100b3daa33ab59f550e918d69eb668978b5a7e95
@@ -11,13 +11,13 @@ module TomosiaIcon8Crawl
11
11
  p "No data!"
12
12
  else
13
13
  if max == nil
14
- uri = "https://search.icons8.com/api/iconsets/v5/search?term=#{key}&amount=1"
15
- page = HTTParty.get(uri)
14
+ urlc = 'https://search.icons8.com/api/iconsets/v5/search?term=' + key + '&amount=1'
15
+ page = HTTParty.get(urlc)
16
16
  res = page.parsed_response
17
17
  countAll = res['parameters']['countAll']
18
- url = "https://search.icons8.com/api/iconsets/v5/search?term=#{key}&amount=#{countAll}"
18
+ url = 'https://search.icons8.com/api/iconsets/v5/search?term=' + key + '&amount=' + countAll
19
19
  else
20
- url = "https://search.icons8.com/api/iconsets/v5/search?term=#{key}&amount=#{max}"
20
+ url = 'https://search.icons8.com/api/iconsets/v5/search?term=' + key + '&amount=' + max
21
21
  end
22
22
  end
23
23
 
@@ -64,10 +64,10 @@ module TomosiaIcon8Crawl
64
64
  row.each do |key, value|
65
65
  # p key
66
66
 
67
- worksheet.write_string(i, 0, row['index'], data_col)
67
+ worksheet.write_string(i, 0, row['index'].to_s, data_col)
68
68
  worksheet.write_string(i, 1, row['name'], data_col)
69
69
  worksheet.write_url(i, 2, row['url'], format_url)
70
- worksheet.write_string(i, 3, row['size'], data_col)
70
+ worksheet.write_string(i, 3, row['size'].to_s, data_col)
71
71
  worksheet.write_string(i, 4, row['extension'], data_col)
72
72
  end
73
73
  end
@@ -77,7 +77,7 @@ module TomosiaIcon8Crawl
77
77
  workbook.close
78
78
  rescue Exception => e
79
79
  p "Can't saved file"
80
- p e
80
+ # p e
81
81
  # break
82
82
  end
83
83
  end
@@ -1,3 +1,3 @@
1
1
  module TomosiaIcon8Crawl
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tomosia_icon8_crawl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ninh-tomosia