cafe_basics_duo 0.1.55 → 0.1.57
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 +22 -14
- 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: 5ba1f5e67864021ce468b7221e971657cd3bcdf861ecb356ef8fc9469d54cd50
|
4
|
+
data.tar.gz: 07e7e1bae82c7a22532023761f89288b71d1ad119a0907deb4461d3ebda8dcdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4072b667d0174afb9b934334b6bc0754a1162a35174d13c886c10e36b678c0f30b0458c20dc4f2aadb41e9b93c1035a07ff64ef3f13826627a85e6373332951c
|
7
|
+
data.tar.gz: 0b1ea78fcc1a2585352ebf7b04e7ac1ffb5f3124f719b38846ee9dcc4cdc0c2c91e67d62c724f6084e256984ad84e4b177f8ee4f5a7e5dcc07cbc36029db80ef
|
data/lib/cafe_basics_duo.rb
CHANGED
@@ -509,19 +509,29 @@ class Naver
|
|
509
509
|
begin
|
510
510
|
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
511
511
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
512
|
-
wait.until { @driver.find_element(:xpath, '//*[@
|
513
|
-
|
514
|
-
@driver.find_element(:xpath, '//*[@id="login_keep_wrap"]/div[1]/label').click
|
515
|
-
sleep(1.5)
|
516
|
-
@driver.find_element(:xpath, '//*[@id="id"]').click
|
512
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="id" and @name="id"]') }
|
513
|
+
@driver.find_element(:xpath, '//*[@id="id" and @name="id"]').click
|
517
514
|
Clipboard.copy(user_id)
|
518
515
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
519
516
|
sleep(1.5)
|
520
|
-
@driver.find_element(:xpath, '//*[@id="pw"]').click
|
517
|
+
@driver.find_element(:xpath, '//*[@id="pw" and @name="pw"]').click
|
521
518
|
Clipboard.copy(user_pw)
|
522
519
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
523
520
|
sleep(1.5)
|
524
|
-
|
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
|
525
535
|
sleep(2.5)
|
526
536
|
rescue => e
|
527
537
|
puts '-[√] 로딩 지연 접속 실패.......'.red
|
@@ -534,9 +544,8 @@ class Naver
|
|
534
544
|
puts "Failed to close tab: #{e.message}"
|
535
545
|
end
|
536
546
|
end
|
537
|
-
@driver.quit
|
538
547
|
return 0
|
539
|
-
|
548
|
+
@driver.quit
|
540
549
|
end
|
541
550
|
|
542
551
|
else
|
@@ -544,9 +553,9 @@ class Naver
|
|
544
553
|
end
|
545
554
|
|
546
555
|
begin
|
547
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
556
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
548
557
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
549
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
|
558
|
+
wait.until { @driver.find_element(:xpath, '//*[@type="button" and @class="MyView-module__btn_logout___bsTOJ"]') }
|
550
559
|
|
551
560
|
rescue => e
|
552
561
|
puts '-[√] 로그인 실패.......'.red
|
@@ -559,10 +568,9 @@ class Naver
|
|
559
568
|
puts "Failed to close tab: #{e.message}"
|
560
569
|
end
|
561
570
|
end
|
562
|
-
@driver.quit
|
563
571
|
return 0
|
564
|
-
|
565
|
-
end
|
572
|
+
@driver.quit
|
573
|
+
end
|
566
574
|
end
|
567
575
|
|
568
576
|
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.57
|
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-08 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: File to Clipboard gem
|
13
13
|
email: mymin26@naver.com
|