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