nblog_zon 111.120.007 → 111.120.010

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 +20 -27
  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: f1c75a34edadbd615df66a9b0287f6d4da675587304df7f5619e53e3020ebd4b
4
+ data.tar.gz: 108fd1c2199517d87289b411d7f45be94e948debb440e869852ac6bc67be8603
5
5
  SHA512:
6
- metadata.gz: 49ee4ef1a31bc37943a6de592651693148a2168eaed6b8e80ae1f9acf473eb9e1d8bfa7a793b93d5056dc05de87c33ac5c199eb7ea03f83681e0322a7578df50
7
- data.tar.gz: fcb9dadc89b8ab19ecae5b2c1fa358d6a830f9dd5c6da6b31b90e173a321eb920c9e3e8d434b72e71ac64c64a4280c5f7c44edf5fd740bdf92a04b15f26eee72
6
+ metadata.gz: 53d6dc64bd0df6911a16d95ccc7e5071e0d589b51d868eba3c0eff7ac240d61d70dc08db88181ec26a34659238b4ba7c0df817811980a30d797d9157859673c1
7
+ data.tar.gz: b0f1bc844a9c6c0e32ec656993f9ce4875f93f7abeaf6d21a0d681d43f2ea282a745b3a64390c27c8a57b1f2fa5e4f6186e2c76d68f4ad096959205516b9e0f6
data/lib/nblog_zon.rb CHANGED
@@ -311,11 +311,11 @@ class Naver
311
311
  FileUtils.mkdir_p(naver_cookie_dir) unless File.exist?(naver_cookie_dir)
312
312
  if proxy == ''
313
313
 
314
- system(%{"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" https://naver.com/ --remote-debugging-port=9222 --user-data-dir=C:/naver_cookie/#{user_id} --no-first-run --no-default-browser-check --disable-sync})
314
+ system(%{"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" https://my.naver.com/ --remote-debugging-port=9222 --user-data-dir=C:/naver_cookie/#{user_id} --no-first-run --no-default-browser-check --disable-sync})
315
315
 
316
316
  else
317
317
 
318
- system(%{"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" https://naver.com/ --remote-debugging-port=9222 --user-data-dir=C:/naver_cookie/#{user_id} --proxy-server=#{proxy.to_s.force_encoding('utf-8').to_s} --no-first-run --no-default-browser-check --disable-sync})
318
+ system(%{"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" https://my.naver.com/ --remote-debugging-port=9222 --user-data-dir=C:/naver_cookie/#{user_id} --proxy-server=#{proxy.to_s.force_encoding('utf-8').to_s} --no-first-run --no-default-browser-check --disable-sync})
319
319
 
320
320
  end
321
321
  end
@@ -467,29 +467,24 @@ class Naver
467
467
 
468
468
 
469
469
  chrome_start(proxy, user_id)
470
- @driver.get('https://www.naver.com')
471
- puts'[Step.01] 계정 로그인 및 세션 확인.......'.yellow
472
-
470
+
473
471
 
474
472
  sleep(1)
475
473
 
476
474
  begin
477
- wait = Selenium::WebDriver::Wait.new(:timeout => 7)
475
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
478
476
  #요소가 나타날 때까지 3초 동안 기다립니다.
479
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
477
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
480
478
  sleep(1.5)
481
479
  check_cookie_login = 1
482
- puts'[Step.02] 계정 세션 확인!! 로그인 skip.......'.yellow
480
+ puts' 계정 세션 확인!! 로그인 skip.......'.yellow
483
481
  sleep(2.5)
484
482
  rescue
485
483
  begin
486
- wait = Selenium::WebDriver::Wait.new(:timeout => 7)
487
- # 요소가 나타날 때까지 기다립니다.
488
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]') }
484
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
485
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]') }
489
486
  sleep(1.5)
490
-
491
- # 요소가 있으면 클릭
492
- @driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]').click
487
+ @driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]').click
493
488
  check_cookie_login = 0
494
489
  sleep(1)
495
490
  rescue
@@ -499,16 +494,15 @@ class Naver
499
494
  end
500
495
 
501
496
  if check_cookie_login == 0
502
- puts'[Step.02] 계정 세션이 없거나 기간 만료로 인해 로그인 시도.......'.yellow
497
+ puts' 계정 세션이 없거나 기간 만료로 인해 로그인 시도.......'.yellow
503
498
  # @driver.find_element(:xpath, '//*[@id="right-content-area"]/div[1]/div[1]/div/a').click
504
499
  sleep(3)
505
500
  begin
506
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
501
+ wait = Selenium::WebDriver::Wait.new(:timeout => 7)
507
502
  #요소가 나타날 때까지 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
503
+ wait.until { @driver.find_element(:xpath, '//*[@id="id"]') }
511
504
  sleep(1.5)
505
+
512
506
  @driver.find_element(:xpath, '//*[@id="id"]').click
513
507
  Clipboard.copy(user_id)
514
508
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
@@ -517,7 +511,7 @@ class Naver
517
511
  Clipboard.copy(user_pw)
518
512
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
519
513
  sleep(1.5)
520
- @driver.find_element(:xpath, '//*[@id="log.login"]').click
514
+ @driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
521
515
  sleep(2.5)
522
516
  rescue => e
523
517
  puts '-[√] 로딩 지연 접속 실패.......'.red
@@ -530,8 +524,8 @@ class Naver
530
524
  puts "Failed to close tab: #{e.message}"
531
525
  end
532
526
  end
533
- @driver.quit
534
527
  return 0
528
+ @driver.quit
535
529
  end
536
530
 
537
531
  else
@@ -539,10 +533,9 @@ class Naver
539
533
  end
540
534
 
541
535
  begin
542
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
536
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
543
537
  #요소가 나타날 때까지 3초 동안 기다립니다.
544
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
545
-
538
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
546
539
  rescue => e
547
540
  puts '-[√] 로그인 실패.......'.red
548
541
  @driver.window_handles.each do |handle|
@@ -554,9 +547,9 @@ class Naver
554
547
  puts "Failed to close tab: #{e.message}"
555
548
  end
556
549
  end
557
- @driver.quit
558
- return 0
559
- end
550
+ return 0
551
+ @driver.quit
552
+ end
560
553
  end
561
554
 
562
555
  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.010
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-09 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: rnjstnswp123@naver.com