nblog_duo 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_duo.rb +17 -34
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 843cb7a347f451a0b986d2e758fea5cb4a0150c0db432ab4e34d4d425ecad341
4
- data.tar.gz: c20bdfad6c851c13c92bdffdc65fab30153e178b9557b728efedefd5629d31f1
3
+ metadata.gz: dab0b48343a27ad924161c57cc2230fbd8a00a16e137c0744b05fa46be80d367
4
+ data.tar.gz: c406c6daa528d7ea66d8e8a55c725ab4d20fb069dc31438979efe840e5b8dcfa
5
5
  SHA512:
6
- metadata.gz: 00d8692a4a1fc7bf996479be315232fb0177fb8fe9e2703d2e1d9ce8df69f1cccd56b27c1889e0cfdc031b4c4f32117996faa9c53187288476ce53a149bb42b4
7
- data.tar.gz: ee87f70b88957e83d212c241bc0174238ba6f22c68998765c004ae34edcfbeeeddfb31664886305c1fe654c84ae46a1373f347bee48859bf3502a9cbaf2c4873
6
+ metadata.gz: 64d00d21faea55df2f58888f0ea98677ae56b82e763d35e05afbf6212475bacf9bce07df08cbd94c5503aed0ba0070c6f0ee8878849a93020d1274587566173f
7
+ data.tar.gz: 1979591133b85f01d0457f9e69f5cf659e5b230d438d9cb8819c1895c8339507feed2ebe605007a6d947f87794626e5a05e5ee7604818187e70722ee7869f457
data/lib/nblog_duo.rb CHANGED
@@ -313,11 +313,11 @@ class Naver
313
313
  FileUtils.mkdir_p(naver_cookie_dir) unless File.exist?(naver_cookie_dir)
314
314
  if proxy == ''
315
315
 
316
- 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})
316
+ 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})
317
317
 
318
318
  else
319
319
 
320
- 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})
320
+ 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})
321
321
 
322
322
  end
323
323
  end
@@ -469,29 +469,24 @@ class Naver
469
469
 
470
470
 
471
471
  chrome_start(proxy, user_id)
472
- @driver.get('https://www.naver.com')
473
- puts'[Step.01] 계정 로그인 및 세션 확인.......'.yellow
474
-
472
+
475
473
 
476
474
  sleep(1)
477
475
 
478
476
  begin
479
- wait = Selenium::WebDriver::Wait.new(:timeout => 7)
477
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
480
478
  #요소가 나타날 때까지 3초 동안 기다립니다.
481
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
479
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
482
480
  sleep(1.5)
483
481
  check_cookie_login = 1
484
- puts'[Step.02] 계정 세션 확인!! 로그인 skip.......'.yellow
482
+ puts' 계정 세션 확인!! 로그인 skip.......'.yellow
485
483
  sleep(2.5)
486
484
  rescue
487
485
  begin
488
- wait = Selenium::WebDriver::Wait.new(:timeout => 7)
489
- # 요소가 나타날 때까지 기다립니다.
490
- wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]') }
486
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
487
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]') }
491
488
  sleep(1.5)
492
-
493
- # 요소가 있으면 클릭
494
- @driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]').click
489
+ @driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]').click
495
490
  check_cookie_login = 0
496
491
  sleep(1)
497
492
  rescue
@@ -501,35 +496,24 @@ class Naver
501
496
  end
502
497
 
503
498
  if check_cookie_login == 0
504
- puts'[Step.02] 계정 세션이 없거나 기간 만료로 인해 로그인 시도.......'.yellow
499
+ puts' 계정 세션이 없거나 기간 만료로 인해 로그인 시도.......'.yellow
505
500
  # @driver.find_element(:xpath, '//*[@id="right-content-area"]/div[1]/div[1]/div/a').click
506
501
  sleep(3)
507
502
  begin
508
503
  wait = Selenium::WebDriver::Wait.new(:timeout => 7)
509
504
  #요소가 나타날 때까지 3초 동안 기다립니다.
510
- wait.until { @driver.find_element(:xpath, '//*[@id="id" and @name="id"]') }
511
- @driver.find_element(:xpath, '//*[@id="id" and @name="id"]').click
505
+ wait.until { @driver.find_element(:xpath, '//*[@id="id"]') }
506
+ sleep(1.5)
507
+
508
+ @driver.find_element(:xpath, '//*[@id="id"]').click
512
509
  Clipboard.copy(user_id)
513
510
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
514
511
  sleep(1.5)
515
- @driver.find_element(:xpath, '//*[@id="pw" and @name="pw"]').click
512
+ @driver.find_element(:xpath, '//*[@id="pw"]').click
516
513
  Clipboard.copy(user_pw)
517
514
  @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
518
515
  sleep(1.5)
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
516
+ @driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
533
517
  sleep(2.5)
534
518
  rescue => e
535
519
  puts '-[√] 로딩 지연 접속 실패.......'.red
@@ -553,8 +537,7 @@ class Naver
553
537
  begin
554
538
  wait = Selenium::WebDriver::Wait.new(:timeout => 5)
555
539
  #요소가 나타날 때까지 3초 동안 기다립니다.
556
- wait.until { @driver.find_element(:xpath, '//*[@type="button" and @class="MyView-module__btn_logout___bsTOJ"]') }
557
-
540
+ wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
558
541
  rescue => e
559
542
  puts '-[√] 로그인 실패.......'.red
560
543
  @driver.window_handles.each do |handle|
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.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: mymin26@naver.com