cafe_basics_duo 0.1.55 → 0.1.59
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/cafe_basics_duo.rb +18 -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: 21ae020c8d561414a1ffcd26072c5a3d6b071ed30750f0b5d1d7c226fb6d7afd
|
4
|
+
data.tar.gz: 208709d4b4ec7bf784b3d98ce8303077ac5b897fa7fab56ecdd397bacebb4956
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab7bd72bf184f5af4405677e3c9d622c32dd6788b2aaa6c6e85f051e4cf8e333c65882ab66b37e1147f6a3faaedd862a415dc90e9748422cd9f9a6f14f313a67
|
7
|
+
data.tar.gz: 472f16cab37b732e03784d6c70906d038eade1387907af3e71fbf2928df1731ef213f0b7e547f5c3918e1e90f2a7e14144240da18f67ebd5f97ffde93464f3d2
|
data/lib/cafe_basics_duo.rb
CHANGED
@@ -314,11 +314,11 @@ class Naver
|
|
314
314
|
FileUtils.mkdir_p(naver_cookie_dir) unless File.exist?(naver_cookie_dir)
|
315
315
|
if proxy == ''
|
316
316
|
|
317
|
-
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})
|
317
|
+
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})
|
318
318
|
|
319
319
|
else
|
320
320
|
|
321
|
-
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})
|
321
|
+
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})
|
322
322
|
|
323
323
|
end
|
324
324
|
end
|
@@ -471,29 +471,24 @@ class Naver
|
|
471
471
|
|
472
472
|
|
473
473
|
chrome_start(proxy, user_id)
|
474
|
-
|
475
|
-
puts'[Step.01] 계정 로그인 및 세션 확인.......'.yellow
|
476
|
-
|
474
|
+
|
477
475
|
|
478
476
|
sleep(1)
|
479
477
|
|
480
478
|
begin
|
481
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
479
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
482
480
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
483
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="
|
481
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
|
484
482
|
sleep(1.5)
|
485
483
|
check_cookie_login = 1
|
486
|
-
puts'
|
484
|
+
puts'✅ 계정 세션 확인!! 로그인 skip.......'.yellow
|
487
485
|
sleep(2.5)
|
488
486
|
rescue
|
489
487
|
begin
|
490
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
491
|
-
|
492
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]') }
|
488
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
489
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]') }
|
493
490
|
sleep(1.5)
|
494
|
-
|
495
|
-
# 요소가 있으면 클릭
|
496
|
-
@driver.find_element(:xpath, '//*[@class="MyView-module__link_login___HpHMW"]').click
|
491
|
+
@driver.find_element(:xpath, '//*[@class="HeaderView_login_text__pFpJ_"]').click
|
497
492
|
check_cookie_login = 0
|
498
493
|
sleep(1)
|
499
494
|
rescue
|
@@ -503,16 +498,15 @@ class Naver
|
|
503
498
|
end
|
504
499
|
|
505
500
|
if check_cookie_login == 0
|
506
|
-
puts'
|
501
|
+
puts'✅ 계정 세션이 없거나 기간 만료로 인해 로그인 시도.......'.yellow
|
507
502
|
# @driver.find_element(:xpath, '//*[@id="right-content-area"]/div[1]/div[1]/div/a').click
|
508
503
|
sleep(3)
|
509
504
|
begin
|
510
505
|
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
511
506
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
512
|
-
wait.until { @driver.find_element(:xpath, '//*[@
|
513
|
-
sleep(1.5)
|
514
|
-
@driver.find_element(:xpath, '//*[@id="login_keep_wrap"]/div[1]/label').click
|
507
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="id"]') }
|
515
508
|
sleep(1.5)
|
509
|
+
|
516
510
|
@driver.find_element(:xpath, '//*[@id="id"]').click
|
517
511
|
Clipboard.copy(user_id)
|
518
512
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
@@ -521,7 +515,7 @@ class Naver
|
|
521
515
|
Clipboard.copy(user_pw)
|
522
516
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
523
517
|
sleep(1.5)
|
524
|
-
@driver.find_element(:xpath, '//*[@id="
|
518
|
+
@driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
|
525
519
|
sleep(2.5)
|
526
520
|
rescue => e
|
527
521
|
puts '-[√] 로딩 지연 접속 실패.......'.red
|
@@ -534,9 +528,8 @@ class Naver
|
|
534
528
|
puts "Failed to close tab: #{e.message}"
|
535
529
|
end
|
536
530
|
end
|
537
|
-
@driver.quit
|
538
531
|
return 0
|
539
|
-
|
532
|
+
@driver.quit
|
540
533
|
end
|
541
534
|
|
542
535
|
else
|
@@ -544,10 +537,9 @@ class Naver
|
|
544
537
|
end
|
545
538
|
|
546
539
|
begin
|
547
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
540
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
548
541
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
549
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="
|
550
|
-
|
542
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
|
551
543
|
rescue => e
|
552
544
|
puts '-[√] 로그인 실패.......'.red
|
553
545
|
@driver.window_handles.each do |handle|
|
@@ -559,10 +551,9 @@ class Naver
|
|
559
551
|
puts "Failed to close tab: #{e.message}"
|
560
552
|
end
|
561
553
|
end
|
562
|
-
@driver.quit
|
563
554
|
return 0
|
564
|
-
|
565
|
-
end
|
555
|
+
@driver.quit
|
556
|
+
end
|
566
557
|
end
|
567
558
|
|
568
559
|
def create_id
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_basics_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.59
|
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
|