nblog_zon 111.120.009 → 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 +18 -35
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd0b2bcd685cc656f2bf6d919856b94eaaf05ee83e661ac3467dc48cb24fb6f1
4
- data.tar.gz: 8ee73879e732dd5eb57d46e3fb926a3bd13495eca9a85f9d19179ce6073aa06d
3
+ metadata.gz: f1c75a34edadbd615df66a9b0287f6d4da675587304df7f5619e53e3020ebd4b
4
+ data.tar.gz: 108fd1c2199517d87289b411d7f45be94e948debb440e869852ac6bc67be8603
5
5
  SHA512:
6
- metadata.gz: 8aee687aac082ba1c277a1eac6d4f773065eb91ca8de02b53c349768a6c46cc3d726a1bd952e40b4e5364168036fa979e2e5f436397cc17b55f186ef811a458a
7
- data.tar.gz: 22721d56f7b5a358ab7bfa794d9d5443e81e39cb242bee45be77779f49537f0e8180ebb3ee1688c24e816cb5f3ccff7f12c1f8c666c5a9120a0cbc38d29d8dab
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,35 +494,24 @@ 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
501
  wait = Selenium::WebDriver::Wait.new(:timeout => 7)
507
502
  #요소가 나타날 때까지 3초 동안 기다립니다.
508
- wait.until { @driver.find_element(:xpath, '//*[@id="id" and @name="id"]') }
509
- @driver.find_element(:xpath, '//*[@id="id" and @name="id"]').click
503
+ wait.until { @driver.find_element(:xpath, '//*[@id="id"]') }
504
+ sleep(1.5)
505
+
506
+ @driver.find_element(:xpath, '//*[@id="id"]').click
510
507
  Clipboard.copy(user_id)
511
508
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
512
509
  sleep(1.5)
513
- @driver.find_element(:xpath, '//*[@id="pw" and @name="pw"]').click
510
+ @driver.find_element(:xpath, '//*[@id="pw"]').click
514
511
  Clipboard.copy(user_pw)
515
512
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
516
513
  sleep(1.5)
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
514
+ @driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
531
515
  sleep(2.5)
532
516
  rescue => e
533
517
  puts '-[√] 로딩 지연 접속 실패.......'.red
@@ -551,8 +535,7 @@ class Naver
551
535
  begin
552
536
  wait = Selenium::WebDriver::Wait.new(:timeout => 5)
553
537
  #요소가 나타날 때까지 3초 동안 기다립니다.
554
- wait.until { @driver.find_element(:xpath, '//*[@type="button" and @class="MyView-module__btn_logout___bsTOJ"]') }
555
-
538
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
556
539
  rescue => e
557
540
  puts '-[√] 로그인 실패.......'.red
558
541
  @driver.window_handles.each do |handle|
@@ -566,7 +549,7 @@ class Naver
566
549
  end
567
550
  return 0
568
551
  @driver.quit
569
- end
552
+ end
570
553
  end
571
554
 
572
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.009
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-08 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