cafe_buy 0.1.60 → 0.1.63
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.rb +23 -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: 9add5917aca98a583482c30a101f442277b91e1875a3fe29845bcc0ae9835237
|
4
|
+
data.tar.gz: f24cfd19a831d0fe784e56a95eb4e1448a22cfaa498f79359f1dfd236720cdc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f42a5bc82f816f3e19ca9e764f2e3baf3a19327f2f2fdf60591c4c8c1c761da67ff673a7726b2a4db409a865473f547e9a3c471ed51c1fd765b730357415bff
|
7
|
+
data.tar.gz: a0a7e1f3c68e5b7ab0a089557ac9b300654eabe4d00d0f38f4ca3f27f987d07f612c6d783107692a84163a6b095530832b53e290706f3f87fed622eed585b180
|
data/lib/cafe_buy.rb
CHANGED
@@ -23,7 +23,6 @@ include AutoClickMethods
|
|
23
23
|
using Rainbow
|
24
24
|
include Glimmer
|
25
25
|
|
26
|
-
|
27
26
|
class Chat
|
28
27
|
def initialize(api_key, gpt_keyword_prompt, model)
|
29
28
|
@api_key = api_key
|
@@ -271,6 +270,7 @@ end
|
|
271
270
|
|
272
271
|
|
273
272
|
|
273
|
+
|
274
274
|
#############################################gpt############################################
|
275
275
|
|
276
276
|
class Naver
|
@@ -308,7 +308,6 @@ class Naver
|
|
308
308
|
# end
|
309
309
|
#end
|
310
310
|
|
311
|
-
|
312
311
|
def chrome_setup(user_id, proxy)
|
313
312
|
naver_cookie_dir = "C:/naver_cookie"
|
314
313
|
FileUtils.mkdir_p(naver_cookie_dir) unless File.exist?(naver_cookie_dir)
|
@@ -405,16 +404,16 @@ class Naver
|
|
405
404
|
puts 'proxy error...'
|
406
405
|
begin
|
407
406
|
begin
|
408
|
-
|
407
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
409
408
|
rescue => e
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
409
|
+
puts "chromedriver 버전 불일치!!"
|
410
|
+
puts "아래 지침을 따라주세요."
|
411
|
+
puts "1.프로그램 종료!"
|
412
|
+
puts "2.크롬 업데이트!"
|
413
|
+
puts "3.프로그램 폴더 내부에 ★tip★-시작시-크롬창이....파일 실행"
|
414
|
+
puts "4.안내된 방식으로 크롬 드라이버 교체"
|
415
|
+
puts "5.재 시작"
|
416
|
+
exit 1
|
418
417
|
end
|
419
418
|
options = Selenium::WebDriver::Chrome::Options.new
|
420
419
|
options.add_argument('--no-first-run') # 자동 실행 시 나타나는 "첫 실행" 화면 방지
|
@@ -447,8 +446,6 @@ class Naver
|
|
447
446
|
|
448
447
|
|
449
448
|
|
450
|
-
|
451
|
-
|
452
449
|
def login(user_id, user_pw, proxy)
|
453
450
|
@user_id = user_id
|
454
451
|
@user_id11 = user_id
|
@@ -518,6 +515,18 @@ class Naver
|
|
518
515
|
sleep(1.5)
|
519
516
|
@driver.find_element(:xpath, '//*[@type="submit" and @class="btn_check next_step" and @id="submit_btn"]').click
|
520
517
|
sleep(2.5)
|
518
|
+
begin
|
519
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
520
|
+
#요소가 나타날 때까지 3초 동안 기다립니다.
|
521
|
+
wait.until { @driver.find_element(:xpath, '//button[@ype="button" and @id="new.save" and @class="btn_check nlog-click"]') } #기기 확인 버튼 확인
|
522
|
+
#wait.until { @driver.find_element(:xpath, '//button[@ype="button" and @id="new.dontsave" and @class="btn_white nlog-click"]') } #기기 취소 버튼 확인
|
523
|
+
sleep(1.5)
|
524
|
+
@driver.find_element(:xpath, '//button[@ype="button" and @id="new.save" and @class="btn_check nlog-click"]').click
|
525
|
+
#@driver.find_element(:xpath, '//button[@ype="button" and @id="new.dontsave" and @class="btn_white nlog-click"]') #기기 취소 버튼 클릭
|
526
|
+
rescue
|
527
|
+
end
|
528
|
+
|
529
|
+
|
521
530
|
rescue => e
|
522
531
|
puts '-[√] 로딩 지연 접속 실패.......'.red
|
523
532
|
@driver.window_handles.each do |handle|
|
@@ -554,7 +563,7 @@ class Naver
|
|
554
563
|
end
|
555
564
|
return 0
|
556
565
|
@driver.quit
|
557
|
-
end
|
566
|
+
end
|
558
567
|
end
|
559
568
|
|
560
569
|
def create_id
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_buy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.63
|
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-16 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: File to Clipboard gem
|
13
13
|
email: mymin26@naver.com
|