nblog_zon 111.120.007 → 111.120.009

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nblog_zon.rb +24 -14
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09e743a070f6cfa1a84d4f0857203dc6eb6ce4f21e3f4ca6525d7892324b1224'
4
- data.tar.gz: 05d0d35e7d1842b66404a345fadc29a50340fc1406889ea42a946a22ae5f87f3
3
+ metadata.gz: dd0b2bcd685cc656f2bf6d919856b94eaaf05ee83e661ac3467dc48cb24fb6f1
4
+ data.tar.gz: 8ee73879e732dd5eb57d46e3fb926a3bd13495eca9a85f9d19179ce6073aa06d
5
5
  SHA512:
6
- metadata.gz: 49ee4ef1a31bc37943a6de592651693148a2168eaed6b8e80ae1f9acf473eb9e1d8bfa7a793b93d5056dc05de87c33ac5c199eb7ea03f83681e0322a7578df50
7
- data.tar.gz: fcb9dadc89b8ab19ecae5b2c1fa358d6a830f9dd5c6da6b31b90e173a321eb920c9e3e8d434b72e71ac64c64a4280c5f7c44edf5fd740bdf92a04b15f26eee72
6
+ metadata.gz: 8aee687aac082ba1c277a1eac6d4f773065eb91ca8de02b53c349768a6c46cc3d726a1bd952e40b4e5364168036fa979e2e5f436397cc17b55f186ef811a458a
7
+ data.tar.gz: 22721d56f7b5a358ab7bfa794d9d5443e81e39cb242bee45be77779f49537f0e8180ebb3ee1688c24e816cb5f3ccff7f12c1f8c666c5a9120a0cbc38d29d8dab
data/lib/nblog_zon.rb CHANGED
@@ -503,21 +503,31 @@ class Naver
503
503
  # @driver.find_element(:xpath, '//*[@id="right-content-area"]/div[1]/div[1]/div/a').click
504
504
  sleep(3)
505
505
  begin
506
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
506
+ wait = Selenium::WebDriver::Wait.new(:timeout => 7)
507
507
  #요소가 나타날 때까지 3초 동안 기다립니다.
508
- wait.until { @driver.find_element(:xpath, '//*[@for="switch"]') }
509
- sleep(1.5)
510
- @driver.find_element(:xpath, '//*[@id="login_keep_wrap"]/div[1]/label').click
511
- sleep(1.5)
512
- @driver.find_element(:xpath, '//*[@id="id"]').click
508
+ wait.until { @driver.find_element(:xpath, '//*[@id="id" and @name="id"]') }
509
+ @driver.find_element(:xpath, '//*[@id="id" and @name="id"]').click
513
510
  Clipboard.copy(user_id)
514
511
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
515
512
  sleep(1.5)
516
- @driver.find_element(:xpath, '//*[@id="pw"]').click
513
+ @driver.find_element(:xpath, '//*[@id="pw" and @name="pw"]').click
517
514
  Clipboard.copy(user_pw)
518
515
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
519
516
  sleep(1.5)
520
- @driver.find_element(:xpath, '//*[@id="log.login"]').click
517
+
518
+ begin
519
+ smart_level_value = @driver.find_element(id: 'smart_LEVEL').attribute('value')
520
+ if smart_level_value == '1'
521
+ @driver.find_element(xpath: '//label[@for="switch" and @class="switch_btn"]').click
522
+ sleep(1.5)
523
+ end
524
+ rescue
525
+ end
526
+
527
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
528
+ #요소가 나타날 때까지 3초 동안 기다립니다.
529
+ wait.until { @driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]') }
530
+ @driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]').click
521
531
  sleep(2.5)
522
532
  rescue => e
523
533
  puts '-[√] 로딩 지연 접속 실패.......'.red
@@ -530,8 +540,8 @@ class Naver
530
540
  puts "Failed to close tab: #{e.message}"
531
541
  end
532
542
  end
533
- @driver.quit
534
543
  return 0
544
+ @driver.quit
535
545
  end
536
546
 
537
547
  else
@@ -539,9 +549,9 @@ class Naver
539
549
  end
540
550
 
541
551
  begin
542
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
552
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
543
553
  #요소가 나타날 때까지 3초 동안 기다립니다.
544
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
554
+ wait.until { @driver.find_element(:xpath, '//*[@type="button" and @class="MyView-module__btn_logout___bsTOJ"]') }
545
555
 
546
556
  rescue => e
547
557
  puts '-[√] 로그인 실패.......'.red
@@ -554,9 +564,9 @@ class Naver
554
564
  puts "Failed to close tab: #{e.message}"
555
565
  end
556
566
  end
557
- @driver.quit
558
- return 0
559
- end
567
+ return 0
568
+ @driver.quit
569
+ end
560
570
  end
561
571
 
562
572
  def create_id
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nblog_zon
3
3
  version: !ruby/object:Gem::Version
4
- version: 111.120.007
4
+ version: 111.120.009
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-04 00:00:00.000000000 Z
10
+ date: 2025-07-08 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: rnjstnswp123@naver.com