nblog_duo 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.
- checksums.yaml +4 -4
- data/lib/nblog_duo.rb +20 -27
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dab0b48343a27ad924161c57cc2230fbd8a00a16e137c0744b05fa46be80d367
|
4
|
+
data.tar.gz: c406c6daa528d7ea66d8e8a55c725ab4d20fb069dc31438979efe840e5b8dcfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 =>
|
477
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
480
478
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
481
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="
|
479
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
|
482
480
|
sleep(1.5)
|
483
481
|
check_cookie_login = 1
|
484
|
-
puts'
|
482
|
+
puts'✅ 계정 세션 확인!! 로그인 skip.......'.yellow
|
485
483
|
sleep(2.5)
|
486
484
|
rescue
|
487
485
|
begin
|
488
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
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,16 +496,15 @@ class Naver
|
|
501
496
|
end
|
502
497
|
|
503
498
|
if check_cookie_login == 0
|
504
|
-
puts'
|
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
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
503
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
509
504
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
510
|
-
wait.until { @driver.find_element(:xpath, '//*[@
|
511
|
-
sleep(1.5)
|
512
|
-
@driver.find_element(:xpath, '//*[@id="login_keep_wrap"]/div[1]/label').click
|
505
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="id"]') }
|
513
506
|
sleep(1.5)
|
507
|
+
|
514
508
|
@driver.find_element(:xpath, '//*[@id="id"]').click
|
515
509
|
Clipboard.copy(user_id)
|
516
510
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
@@ -519,7 +513,7 @@ class Naver
|
|
519
513
|
Clipboard.copy(user_pw)
|
520
514
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
521
515
|
sleep(1.5)
|
522
|
-
@driver.find_element(:xpath, '//*[@id="
|
516
|
+
@driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
|
523
517
|
sleep(2.5)
|
524
518
|
rescue => e
|
525
519
|
puts '-[√] 로딩 지연 접속 실패.......'.red
|
@@ -532,8 +526,8 @@ class Naver
|
|
532
526
|
puts "Failed to close tab: #{e.message}"
|
533
527
|
end
|
534
528
|
end
|
535
|
-
@driver.quit
|
536
529
|
return 0
|
530
|
+
@driver.quit
|
537
531
|
end
|
538
532
|
|
539
533
|
else
|
@@ -541,10 +535,9 @@ class Naver
|
|
541
535
|
end
|
542
536
|
|
543
537
|
begin
|
544
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
538
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
545
539
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
546
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="
|
547
|
-
|
540
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
|
548
541
|
rescue => e
|
549
542
|
puts '-[√] 로그인 실패.......'.red
|
550
543
|
@driver.window_handles.each do |handle|
|
@@ -556,9 +549,9 @@ class Naver
|
|
556
549
|
puts "Failed to close tab: #{e.message}"
|
557
550
|
end
|
558
551
|
end
|
559
|
-
|
560
|
-
|
561
|
-
|
552
|
+
return 0
|
553
|
+
@driver.quit
|
554
|
+
end
|
562
555
|
end
|
563
556
|
|
564
557
|
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.
|
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-
|
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
|