nblog_duo 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_duo.rb +24 -14
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a494a604797a91e90b8f25b1ecced39a68aedfe04366b1df4b79cd8e673a50a0
4
- data.tar.gz: 52bd6b99a600ffe5bdf923502b7a22a19ed4af3a40fde7fb926ae87d882bf789
3
+ metadata.gz: 843cb7a347f451a0b986d2e758fea5cb4a0150c0db432ab4e34d4d425ecad341
4
+ data.tar.gz: c20bdfad6c851c13c92bdffdc65fab30153e178b9557b728efedefd5629d31f1
5
5
  SHA512:
6
- metadata.gz: 9d767aff89fee41a2822b174a348c2f9bedab384277e913de88dfc16bcdc1d9f0780e6d4f2e5b9c2e90359b6d799823f7c683d336018898127ee0ed87c9d21cd
7
- data.tar.gz: bccec96423a3ed5a2e3c4d08fe4c260a18bdd01ea3870233d57188673a8fc0e10623e2d6ad12812315346c02114e957e4fa2325bd3dfb13aaddc7344d9105ee6
6
+ metadata.gz: 00d8692a4a1fc7bf996479be315232fb0177fb8fe9e2703d2e1d9ce8df69f1cccd56b27c1889e0cfdc031b4c4f32117996faa9c53187288476ce53a149bb42b4
7
+ data.tar.gz: ee87f70b88957e83d212c241bc0174238ba6f22c68998765c004ae34edcfbeeeddfb31664886305c1fe654c84ae46a1373f347bee48859bf3502a9cbaf2c4873
data/lib/nblog_duo.rb CHANGED
@@ -505,21 +505,31 @@ class Naver
505
505
  # @driver.find_element(:xpath, '//*[@id="right-content-area"]/div[1]/div[1]/div/a').click
506
506
  sleep(3)
507
507
  begin
508
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
508
+ wait = Selenium::WebDriver::Wait.new(:timeout => 7)
509
509
  #요소가 나타날 때까지 3초 동안 기다립니다.
510
- wait.until { @driver.find_element(:xpath, '//*[@for="switch"]') }
511
- sleep(1.5)
512
- @driver.find_element(:xpath, '//*[@id="login_keep_wrap"]/div[1]/label').click
513
- sleep(1.5)
514
- @driver.find_element(:xpath, '//*[@id="id"]').click
510
+ wait.until { @driver.find_element(:xpath, '//*[@id="id" and @name="id"]') }
511
+ @driver.find_element(:xpath, '//*[@id="id" and @name="id"]').click
515
512
  Clipboard.copy(user_id)
516
513
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
517
514
  sleep(1.5)
518
- @driver.find_element(:xpath, '//*[@id="pw"]').click
515
+ @driver.find_element(:xpath, '//*[@id="pw" and @name="pw"]').click
519
516
  Clipboard.copy(user_pw)
520
517
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
521
518
  sleep(1.5)
522
- @driver.find_element(:xpath, '//*[@id="log.login"]').click
519
+
520
+ begin
521
+ smart_level_value = @driver.find_element(id: 'smart_LEVEL').attribute('value')
522
+ if smart_level_value == '1'
523
+ @driver.find_element(xpath: '//label[@for="switch" and @class="switch_btn"]').click
524
+ sleep(1.5)
525
+ end
526
+ rescue
527
+ end
528
+
529
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
530
+ #요소가 나타날 때까지 3초 동안 기다립니다.
531
+ wait.until { @driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]') }
532
+ @driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]').click
523
533
  sleep(2.5)
524
534
  rescue => e
525
535
  puts '-[√] 로딩 지연 접속 실패.......'.red
@@ -532,8 +542,8 @@ class Naver
532
542
  puts "Failed to close tab: #{e.message}"
533
543
  end
534
544
  end
535
- @driver.quit
536
545
  return 0
546
+ @driver.quit
537
547
  end
538
548
 
539
549
  else
@@ -541,9 +551,9 @@ class Naver
541
551
  end
542
552
 
543
553
  begin
544
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
554
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
545
555
  #요소가 나타날 때까지 3초 동안 기다립니다.
546
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
556
+ wait.until { @driver.find_element(:xpath, '//*[@type="button" and @class="MyView-module__btn_logout___bsTOJ"]') }
547
557
 
548
558
  rescue => e
549
559
  puts '-[√] 로그인 실패.......'.red
@@ -556,9 +566,9 @@ class Naver
556
566
  puts "Failed to close tab: #{e.message}"
557
567
  end
558
568
  end
559
- @driver.quit
560
- return 0
561
- end
569
+ return 0
570
+ @driver.quit
571
+ end
562
572
  end
563
573
 
564
574
  def create_id
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nblog_duo
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: mymin26@naver.com