cafe_buy_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_buy_duo.rb +21 -13
- 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: daca90772351291588281982417819cb4c4495f75ad006913fb381ee769f286b
|
4
|
+
data.tar.gz: 7ea28b1ff196b6711218a1f2c24c91db54c759f45f54acdaab029b41e8b03c4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 036ce7d7b170cbb50be5dc18dbaac10763bebdb1ad771facc40c56bea1122295c38a5abef6638a7e1d75a4baf10144001ee47731f658a4b99d8a38dc497cbc1d
|
7
|
+
data.tar.gz: 97a251307074658c0507fcfddfe42111105df0bc78ce6408e41079b4f739f15564824101be36fea341129ea4c460323b44b343ebe11304a6d470a5fd0a08278c
|
data/lib/cafe_buy_duo.rb
CHANGED
@@ -511,19 +511,29 @@ class Naver
|
|
511
511
|
begin
|
512
512
|
wait = Selenium::WebDriver::Wait.new(:timeout => 7)
|
513
513
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
514
|
-
wait.until { @driver.find_element(:xpath, '//*[@
|
515
|
-
|
516
|
-
@driver.find_element(:xpath, '//*[@id="login_keep_wrap"]/div[1]/label').click
|
517
|
-
sleep(1.5)
|
518
|
-
@driver.find_element(:xpath, '//*[@id="id"]').click
|
514
|
+
wait.until { @driver.find_element(:xpath, '//*[@id="id" and @name="id"]') }
|
515
|
+
@driver.find_element(:xpath, '//*[@id="id" and @name="id"]').click
|
519
516
|
Clipboard.copy(user_id)
|
520
517
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
521
518
|
sleep(1.5)
|
522
|
-
@driver.find_element(:xpath, '//*[@id="pw"]').click
|
519
|
+
@driver.find_element(:xpath, '//*[@id="pw" and @name="pw"]').click
|
523
520
|
Clipboard.copy(user_pw)
|
524
521
|
@driver.action.key_down(:control).send_keys('v').key_up(:control).perform
|
525
522
|
sleep(1.5)
|
526
|
-
|
523
|
+
|
524
|
+
begin
|
525
|
+
smart_level_value = @driver.find_element(id: 'smart_LEVEL').attribute('value')
|
526
|
+
if smart_level_value == '1'
|
527
|
+
@driver.find_element(xpath: '//label[@for="switch" and @class="switch_btn"]').click
|
528
|
+
sleep(1.5)
|
529
|
+
end
|
530
|
+
rescue
|
531
|
+
end
|
532
|
+
|
533
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
534
|
+
#요소가 나타날 때까지 3초 동안 기다립니다.
|
535
|
+
wait.until { @driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]') }
|
536
|
+
@driver.find_element(xpath: '//button[@type="submit" and @id="log.login"]').click
|
527
537
|
sleep(2.5)
|
528
538
|
rescue => e
|
529
539
|
puts '-[√] 로딩 지연 접속 실패.......'.red
|
@@ -536,9 +546,8 @@ class Naver
|
|
536
546
|
puts "Failed to close tab: #{e.message}"
|
537
547
|
end
|
538
548
|
end
|
539
|
-
@driver.quit
|
540
549
|
return 0
|
541
|
-
|
550
|
+
@driver.quit
|
542
551
|
end
|
543
552
|
|
544
553
|
else
|
@@ -546,9 +555,9 @@ class Naver
|
|
546
555
|
end
|
547
556
|
|
548
557
|
begin
|
549
|
-
wait = Selenium::WebDriver::Wait.new(:timeout =>
|
558
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
550
559
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
551
|
-
wait.until { @driver.find_element(:xpath, '//*[@class="MyView-module__btn_logout___bsTOJ"]') }
|
560
|
+
wait.until { @driver.find_element(:xpath, '//*[@type="button" and @class="MyView-module__btn_logout___bsTOJ"]') }
|
552
561
|
|
553
562
|
rescue => e
|
554
563
|
puts '-[√] 로그인 실패.......'.red
|
@@ -561,9 +570,8 @@ class Naver
|
|
561
570
|
puts "Failed to close tab: #{e.message}"
|
562
571
|
end
|
563
572
|
end
|
564
|
-
@driver.quit
|
565
573
|
return 0
|
566
|
-
|
574
|
+
@driver.quit
|
567
575
|
end
|
568
576
|
end
|
569
577
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_buy_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
|