cafe_basics_duo 0.1.57 → 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 -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: 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,35 +498,24 @@ 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, '//*[@id="id"
|
513
|
-
|
507
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="id"]') }
|
508
|
+
sleep(1.5)
|
509
|
+
|
510
|
+
@driver.find_element(:xpath, '//*[@id="id"]').click
|
514
511
|
Clipboard.copy(user_id)
|
515
512
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
516
513
|
sleep(1.5)
|
517
|
-
@driver.find_element(:xpath, '//*[@id="pw"
|
514
|
+
@driver.find_element(:xpath, '//*[@id="pw"]').click
|
518
515
|
Clipboard.copy(user_pw)
|
519
516
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
520
517
|
sleep(1.5)
|
521
|
-
|
522
|
-
begin
|
523
|
-
smart_level_value = @driver.find_element(id: 'smart_LEVEL').attribute('value')
|
524
|
-
if smart_level_value == '1'
|
525
|
-
@driver.find_element(xpath: '//label[@for="switch" and @class="switch_btn"]').click
|
526
|
-
sleep(1.5)
|
527
|
-
end
|
528
|
-
rescue
|
529
|
-
end
|
530
|
-
|
531
|
-
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
532
|
-
#요소가 나타날 때까지 3초 동안 기다립니다.
|
533
|
-
wait.until { @driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]') }
|
534
|
-
@driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]').click
|
518
|
+
@driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
|
535
519
|
sleep(2.5)
|
536
520
|
rescue => e
|
537
521
|
puts '-[√] 로딩 지연 접속 실패.......'.red
|
@@ -555,8 +539,7 @@ class Naver
|
|
555
539
|
begin
|
556
540
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
557
541
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
558
|
-
wait.until { @driver.find_element(:xpath, '//*[@
|
559
|
-
|
542
|
+
wait.until { @driver.find_element(:xpath, '//*[@class="HeaderView_email__beGsy"]') }
|
560
543
|
rescue => e
|
561
544
|
puts '-[√] 로그인 실패.......'.red
|
562
545
|
@driver.window_handles.each do |handle|
|
@@ -570,7 +553,7 @@ class Naver
|
|
570
553
|
end
|
571
554
|
return 0
|
572
555
|
@driver.quit
|
573
|
-
end
|
556
|
+
end
|
574
557
|
end
|
575
558
|
|
576
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
|