deltago4 4.0.1 → 13.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/deltago4.rb +14 -7
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1e24fc3f24e34fb59aef872873e52961a64907ad31fcf17b824091219c42daf
4
- data.tar.gz: 959139b0284aa162ebec0a8799d976590b63a78993aac6d88df8b7ab7593daa7
3
+ metadata.gz: 1790f951784ab54749de688fdb42a95a7805f607f82115a7626d08063c7c03ee
4
+ data.tar.gz: 37d73ca335648b0984d401b849115a114b34e14bfce8856d59be3b3214411766
5
5
  SHA512:
6
- metadata.gz: f9715cea2723c56e9156887f40df041a91946455b8b80f8ff9c2bdf84a75fd8d1296d63e24558e09b180ce3addae9b4a4f6d94c8be41cb2d75639356bfb5a376
7
- data.tar.gz: 3363864cab1f2b5c21175bb7b7fc2e31537a10d49b48d4288cd5f1019a1a9328efd1ae8744fd9f5734421338e16b4da6bc06ec4d6f1d91eef6ce255d4364539a
6
+ metadata.gz: b1e36517975d2c92345e319695b59e23de36cdbc4d5d57b6e249ccbb3f735f3d2c6d8c458b4b4c25caefb383d7ab4e7a2e4cfbb765569a461be0e4f4c9b0bf1a
7
+ data.tar.gz: d6d19439bab550e492b7ec8f35f2ee479404c6f14c5174ec05d257a952321f8fa68195e2a9aa5a718798fb0f6805ef6bad608f8d4dcad82d668bda753428036a
data/lib/deltago4.rb CHANGED
@@ -262,14 +262,16 @@ class Soonje
262
262
  vv2 += '<div style="text-align: center;" align="center">'+add_text+'</div><br>'
263
263
  end
264
264
 
265
+ title22 = title.split(' ').join('')
266
+
265
267
  begin
266
- Dir.mkdir('./data/'+title)
268
+ Dir.mkdir('./data/'+title22)
267
269
  rescue
268
270
 
269
271
  end
270
272
  sleep(2)
271
273
 
272
- File.open('./data/'+title+'/'+product[0]['productId'].to_s+'.html', 'w') do |f|
274
+ File.open('./data/'+title22+'/'+product[0]['productId'].to_s.split(' ').join('')+'2.html', 'w') do |f|
273
275
  f.write(vv2)
274
276
  end
275
277
 
@@ -282,7 +284,7 @@ class Soonje
282
284
  sleep(10)
283
285
  retry
284
286
  end
285
- File.open('./data/'+title+'/'+dd['productId'].to_s+'.jpg', 'wb') do |f|
287
+ File.open('./data/'+title22+'/'+dd['productId'].to_s+'.jpg', 'wb') do |f|
286
288
  f.write(http_image.body)
287
289
  end
288
290
  end
@@ -376,8 +378,7 @@ class Soonje
376
378
  noko = Nokogiri::HTML(http.to_s)
377
379
  for y in 1..15
378
380
  begin
379
- t = noko.xpath('//*[@id="main_pack"]/section[1]/div/ul/li['+y.to_s+']/div/div[3]/div/a[2]/div').text.to_s
380
-
381
+ t = noko.xpath('//*[@id="main_pack"]/section[1]/div/ul/li['+y.to_s+']/div/div[2]/div[2]/a').text.to_s
381
382
  rescue
382
383
  t = ''
383
384
  end
@@ -469,6 +470,8 @@ class Soonje
469
470
  p title
470
471
  mac_history << title
471
472
  end
473
+
474
+ mac_history = mac_history.uniq
472
475
 
473
476
  mac_address, stderr, status = Open3.capture3('getmac /v')
474
477
  mac_address = mac_address.force_encoding('cp949').encode('utf-8').split('이더넷')[1]
@@ -1426,7 +1429,7 @@ class Coupang
1426
1429
  sleep(3)
1427
1430
  Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
1428
1431
  options = Selenium::WebDriver::Chrome::Options.new
1429
- options.add_option("debuggerAddress", "127.0.0.1:9222")
1432
+ options.add_option("debuggerAddress" , "127.0.0.1:9222")
1430
1433
  @driver = Selenium::WebDriver.for :chrome, options: options
1431
1434
  @driver.manage.window.maximize
1432
1435
  @wait = Selenium::WebDriver::Wait.new(:timeout => 5)
@@ -1445,7 +1448,11 @@ class Coupang
1445
1448
  sleep(1)
1446
1449
  #@driver.find_element(:xpath, '/html/body/div[1]/div/div/form/div[4]/label/span').click
1447
1450
  #sleep(1)
1448
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/form/div[5]/button').click
1451
+ begin
1452
+ @driver.find_element(:xpath, '/html/body/div[1]/div[1]/div[2]/div[1]/form/div[5]/button').click
1453
+ rescue
1454
+ @driver.find_element(:xpath, '/html/body/div[1]/div[1]/div[1]/div/form/div[5]/button').click
1455
+ end
1449
1456
  sleep(5)
1450
1457
 
1451
1458
  rescue => exception
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deltago4
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 13.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - soonje
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-28 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: File to Clipboard gem
14
- email: rnjsalwl123@gmail.com
14
+ email: rnjstnswp123@naver.com
15
15
  executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
@@ -19,7 +19,7 @@ files:
19
19
  - lib/deltago4.rb
20
20
  homepage: ''
21
21
  licenses:
22
- - MIT
22
+ - soonje
23
23
  metadata: {}
24
24
  post_install_message:
25
25
  rdoc_options: []
@@ -36,7 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0'
38
38
  requirements: []
39
- rubygems_version: 3.4.10
39
+ rubygems_version: 3.1.6
40
40
  signing_key:
41
41
  specification_version: 4
42
42
  summary: file to clipboard