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.
- checksums.yaml +4 -4
- data/lib/nblog_zon.rb +18 -35
- 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: f1c75a34edadbd615df66a9b0287f6d4da675587304df7f5619e53e3020ebd4b
|
4
|
+
data.tar.gz: 108fd1c2199517d87289b411d7f45be94e948debb440e869852ac6bc67be8603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 =>
|
475
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
478
476
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
479
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="
|
477
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
|
480
478
|
sleep(1.5)
|
481
479
|
check_cookie_login = 1
|
482
|
-
puts'
|
480
|
+
puts'✅ 계정 세션 확인!! 로그인 skip.......'.yellow
|
483
481
|
sleep(2.5)
|
484
482
|
rescue
|
485
483
|
begin
|
486
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
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'
|
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"
|
509
|
-
|
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"
|
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, '//*[@
|
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.
|
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: rnjstnswp123@naver.com
|